Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0.84 ETH
Eth Value
$2,740.45 (@ $3,262.44/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 178 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint Public | 21547815 | 5 days ago | IN | 0.21 ETH | 0.00057902 | ||||
Mint Public | 21533542 | 7 days ago | IN | 0.21 ETH | 0.00367969 | ||||
Mint Public | 21530436 | 8 days ago | IN | 0.21 ETH | 0.00394857 | ||||
Mint Public | 21525011 | 8 days ago | IN | 0.21 ETH | 0.0005766 | ||||
Withdraw | 20391566 | 167 days ago | IN | 0 ETH | 0.00019126 | ||||
Mint Public | 18950664 | 368 days ago | IN | 0.21 ETH | 0.0022874 | ||||
Mint Public | 18950649 | 368 days ago | IN | 0.21 ETH | 0.00279447 | ||||
Mint Public | 18843190 | 384 days ago | IN | 0.21 ETH | 0.00295784 | ||||
Mint Public | 18280926 | 462 days ago | IN | 0.21 ETH | 0.00052135 | ||||
Mint With Proof | 17978044 | 505 days ago | IN | 0.07 ETH | 0.00255927 | ||||
Mint Public | 17772275 | 533 days ago | IN | 0.21 ETH | 0.00270742 | ||||
Mint Public | 17755041 | 536 days ago | IN | 0.21 ETH | 0.00119606 | ||||
Mint Public | 17755038 | 536 days ago | IN | 0.21 ETH | 0.00122328 | ||||
Mint Public | 17755026 | 536 days ago | IN | 0.21 ETH | 0.00122584 | ||||
Mint Public | 17755021 | 536 days ago | IN | 0.21 ETH | 0.00122409 | ||||
Mint Public | 17741662 | 538 days ago | IN | 0.21 ETH | 0.00168973 | ||||
Mint Public | 17691143 | 545 days ago | IN | 0.21 ETH | 0.00182035 | ||||
Mint Public | 17691082 | 545 days ago | IN | 0.21 ETH | 0.00228774 | ||||
Mint Public | 17430572 | 581 days ago | IN | 0.21 ETH | 0.00188034 | ||||
Mint Public | 17429414 | 582 days ago | IN | 0.21 ETH | 0.00290686 | ||||
Mint Public | 17270504 | 604 days ago | IN | 0.21 ETH | 0.00378486 | ||||
Mint With Proof | 17248902 | 607 days ago | IN | 0.07 ETH | 0.00438398 | ||||
Mint Public | 17248141 | 607 days ago | IN | 0.21 ETH | 0.0034794 | ||||
Mint Public | 16949972 | 649 days ago | IN | 0.21 ETH | 0.00217908 | ||||
Mint With Proof | 16907304 | 655 days ago | IN | 0.07 ETH | 0.00142917 |
Loading...
Loading
Contract Name:
MerkleMinter
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "solmate/utils/ReentrancyGuard.sol"; import "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "./Particles.sol"; import "./Errors.sol"; // Non-reusable dumb implementation of merkle minter for the particle #1 /* :-:.. :*%@@*#@%+: :-:. .+*%@@@@%+@@@@#: .##%@@%*#@@@@@@@%%@@@@@# -%@@@@@@@@@%##%@@%@@@@@@- =%@@@@@@@@@@#. *@@@@@@@@*. +@@@@@@@@@@@@%: .%@@@@%#*- :@@@@@@@@@@@@@%-#@@@@%#*:. #@@@%@%%@@@@@@@%@@%-. .*@%#=..=%@@@@@%%@#. :-. =%%@@%#*. =#%%%* ..-*%#. .. */ contract MerkleMinter is Ownable, ReentrancyGuard { bytes32 public merkleRoot; Particles public particles; uint256 private immutable tokenId; // track if wallet has already minted (one mint per wallet) mapping(address => bool) public minted; // interface labs multisig address public constant beneficiary = 0x0F789fbca6D2fB9207B795154b04aa8a02b9d40d; // mint config uint256 public constant mintPrice = 0.21 ether; uint256 public constant mintMerklePrice = 0.07 ether; uint256 public immutable mintStart; constructor(bytes32 _merkleRoot, address _particles, uint256 _mintStart, uint256 _tokenId) { if (_tokenId == 0) revert Errors.UnknownParticle(); merkleRoot = _merkleRoot; particles = Particles(_particles); tokenId = _tokenId; mintStart = _mintStart; } modifier enough(uint256 _mintPrice) { if (msg.value < _mintPrice) revert Errors.InsufficientFunds(); _; } modifier started() { if (block.number < mintStart) revert Errors.MintNotStarted(); _; } function allowListed(address wallet, bytes32[] calldata proof) public view returns (bool) { return MerkleProof.verify( proof, merkleRoot, keccak256(abi.encodePacked(wallet)) ); } function mintWithProof( bytes32[] calldata _proof ) external payable enough(mintMerklePrice) started nonReentrant { if (!allowListed(msg.sender, _proof)) revert Errors.NotAllowListed(); _mintLogic(); } function mintPublic() external payable enough(mintPrice) started nonReentrant { _mintLogic(); } function _mintLogic() internal { if (minted[msg.sender]) revert Errors.AlreadyMinted(); minted[msg.sender] = true; particles.mint(msg.sender, tokenId, 1); } function withdraw() external onlyOwner { uint256 balance = address(this).balance; (bool transferTx, ) = beneficiary.call{value: balance}(""); if (!transferTx) { revert Errors.WithdrawTransfer(); } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Gas optimized reentrancy protection for smart contracts. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol) abstract contract ReentrancyGuard { uint256 private locked = 1; modifier nonReentrant() virtual { require(locked == 1, "REENTRANCY"); locked = 2; _; locked = 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @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 { _transferOwnership(address(0)); } /** * @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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "solmate/tokens/ERC1155.sol"; import "solmate/utils/ReentrancyGuard.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "./IRenderer.sol"; import "./Errors.sol"; /* . . :=+*#**+**= =*%%%##%%%@%*+= .=#%%%@@%%%%#+++++#+. .%%@@@@@@%#+==+=+#@%*: -%%@@@%*+==++*##@@#+*= =@@%#++++*#%@@%%*++#%#. .#**##%@@@@@%*++*%%%#= +#%@@@@@%#*+*#%%%%*+: :=*%##*#%%%%%###*++: .-=*#%%@@%#+***+-. =++==*#+-: . . */ contract Particles is ERC1155, Ownable, ReentrancyGuard { // emitted when new particles get spawned event Spawn( uint256 indexed tokenId, uint256 maxSpawn, address minter, address renderer, string ipfsHash ); struct Particle { uint256 spawned; uint256 maxSpawn; address minter; address renderer; bytes metadata; } string public baseURI; string public contractURI; mapping(uint256 => Particle) public particles; string public name = "interface particles"; string public symbol = "IN][PA"; constructor(string memory _baseURI, string memory _contractURI) { baseURI = _baseURI; contractURI = _contractURI; } function particleExists(uint256 tokenId) public view returns (bool) { if (particles[tokenId].maxSpawn != 0) { return true; } return false; } function spawn( uint256 tokenId, uint256 maxSpawn, address minter, address renderer, bytes calldata ipfsHash ) external onlyOwner { if (particleExists(tokenId)) revert Errors.ParticleAlreadyExists(); if (maxSpawn == 0) revert Errors.ParticleMaxSpawnCannotBeZero(); particles[tokenId].spawned = 0; particles[tokenId].maxSpawn = maxSpawn; particles[tokenId].metadata = ipfsHash; particles[tokenId].minter = minter; particles[tokenId].renderer = renderer; emit URI(uri(tokenId), tokenId); emit Spawn(tokenId, maxSpawn, minter, renderer, string(ipfsHash)); } function mint( address sender, uint256 tokenId, uint256 editions ) public nonReentrant { if (tokenId == 0) revert Errors.UnknownParticle(); if (!particleExists(tokenId)) revert Errors.UnknownParticle(); if (particles[tokenId].minter != msg.sender) revert Errors.InvalidMinter(); if (particles[tokenId].spawned + editions > particles[tokenId].maxSpawn) revert Errors.MaxSpawnMinted(); particles[tokenId].spawned += editions; _mint(sender, tokenId, editions, ""); } function burn(uint256 tokenId, uint256 editions) public nonReentrant { if (tokenId == 0) revert Errors.UnknownParticle(); if (!particleExists(tokenId)) revert Errors.UnknownParticle(); if (balanceOf[msg.sender][tokenId] < editions) revert Errors.CannotBurnWhatYouDontOwn(); _burn(msg.sender, tokenId, editions); } function setContractURI(string calldata _contractURI) public onlyOwner { contractURI = _contractURI; } function setBaseURI(string calldata _baseURI) public onlyOwner { baseURI = _baseURI; } function updateTokenURI(uint256 tokenId, bytes calldata path) external onlyOwner { particles[tokenId].metadata = path; emit URI(uri(tokenId), tokenId); } function updateTokenRenderer(uint256 tokenId, address _renderer) external onlyOwner { particles[tokenId].renderer = _renderer; } function uri(uint256 tokenId) public view override returns (string memory) { if (particles[tokenId].renderer == address(0)) { return string(abi.encodePacked(baseURI, particles[tokenId].metadata)); } IRenderer renderer = IRenderer(particles[tokenId].renderer); return renderer.uri(tokenId); } function maxSupply(uint256 id) public view returns (uint256) { return particles[id].maxSpawn; } function spawned(uint256 id) public view returns (uint256) { return particles[id].spawned; } // just in case someone sends accidental funds or something function withdraw(address payable payee) external onlyOwner { uint256 balance = address(this).balance; (bool sent, ) = payee.call{value: balance}(""); if (!sent) { revert Errors.WithdrawTransfer(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Errors { /* Particles.sol */ error WithdrawTransfer(); error UnknownParticle(); error InvalidMinter(); error MaxSpawnMinted(); error ParticlePropertiesMissMatch(); error ParticleMaxSpawnCannotBeZero(); error ParticleAlreadyExists(); error PropertyAlreadyExists(); error PropertyMinCannotBeBiggerMax(); error PropertyMaxSpawnCannotBeZero(); error ParticleValueOutOfRangeOrDoesntExist(); error CannotBurnWhatYouDontOwn(); /* MerkleMinter.sol */ error NotAllowListed(); error InsufficientFunds(); error AlreadyMinted(); error MintNotStarted(); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Minimalist and gas efficient standard ERC1155 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts ); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); event URI(string value, uint256 indexed id); /*////////////////////////////////////////////////////////////// ERC1155 STORAGE //////////////////////////////////////////////////////////////*/ mapping(address => mapping(uint256 => uint256)) public balanceOf; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// METADATA LOGIC //////////////////////////////////////////////////////////////*/ function uri(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC1155 LOGIC //////////////////////////////////////////////////////////////*/ function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) public virtual { require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); balanceOf[from][id] -= amount; balanceOf[to][id] += amount; emit TransferSingle(msg.sender, from, to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual { require(ids.length == amounts.length, "LENGTH_MISMATCH"); require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); // Storing these outside the loop saves ~15 gas per iteration. uint256 id; uint256 amount; for (uint256 i = 0; i < ids.length; ) { id = ids[i]; amount = amounts[i]; balanceOf[from][id] -= amount; balanceOf[to][id] += amount; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) public view virtual returns (uint256[] memory balances) { require(owners.length == ids.length, "LENGTH_MISMATCH"); balances = new uint256[](owners.length); // Unchecked because the only math done is incrementing // the array index counter which cannot possibly overflow. unchecked { for (uint256 i = 0; i < owners.length; ++i) { balances[i] = balanceOf[owners[i]][ids[i]]; } } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { balanceOf[to][id] += amount; emit TransferSingle(msg.sender, address(0), to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function _batchMint( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[to][ids[i]] += amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, address(0), to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function _batchBurn( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[from][ids[i]] -= amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, address(0), ids, amounts); } function _burn( address from, uint256 id, uint256 amount ) internal virtual { balanceOf[from][id] -= amount; emit TransferSingle(msg.sender, from, address(0), id, amount); } } /// @notice A generic interface for a contract which properly accepts ERC1155 tokens. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155TokenReceiver { function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRenderer { function uri(uint256 tokenId) external view returns (string memory); }
{ "remappings": [ "ds-test/=lib/solmate/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_particles","type":"address"},{"internalType":"uint256","name":"_mintStart","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyMinted","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"MintNotStarted","type":"error"},{"inputs":[],"name":"NotAllowListed","type":"error"},{"inputs":[],"name":"UnknownParticle","type":"error"},{"inputs":[],"name":"WithdrawTransfer","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"allowListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintMerklePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mintWithProof","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"particles","outputs":[{"internalType":"contract Particles","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040526001805534801561001457600080fd5b50604051610b04380380610b04833981016040819052610033916100e2565b61003c33610092565b8060000361005d57604051631cbb4ba560e11b815260040160405180910390fd5b600293909355600380546001600160a01b0319166001600160a01b03939093169290921790915560809190915260a05261012d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080608085870312156100f857600080fd5b845160208601519094506001600160a01b038116811461011757600080fd5b6040860151606090960151949790965092505050565b60805160a0516109a4610160600039600081816101590152818161040601526104c80152600061072701526109a46000f3fe6080604052600436106100dd5760003560e01c80636817c76c1161007f5780638da5cb5b116100595780638da5cb5b1461024a578063d338b03c14610268578063f2fde38b1461027b578063f53d9eff1461029b57600080fd5b80636817c76c14610211578063715018a61461022d5780638c874ebd1461024257600080fd5b80632eb4a7ab116100bb5780632eb4a7ab1461018957806338af3eed1461019f5780633ccfd60b146101df57806361bd3867146101f657600080fd5b80631e7269c5146100e2578063247155ff14610127578063255e468514610147575b600080fd5b3480156100ee57600080fd5b506101126100fd366004610835565b60046020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013357600080fd5b5061011261014236600461089c565b6102bb565b34801561015357600080fd5b5061017b7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161011e565b34801561019557600080fd5b5061017b60025481565b3480156101ab57600080fd5b506101c7730f789fbca6d2fb9207b795154b04aa8a02b9d40d81565b6040516001600160a01b03909116815260200161011e565b3480156101eb57600080fd5b506101f461033b565b005b34801561020257600080fd5b5061017b66f8b0a10e47000081565b34801561021d57600080fd5b5061017b6702ea11e32ad5000081565b34801561023957600080fd5b506101f46103c6565b6101f46103da565b34801561025657600080fd5b506000546001600160a01b03166101c7565b6101f46102763660046108ef565b61049d565b34801561028757600080fd5b506101f4610296366004610835565b610584565b3480156102a757600080fd5b506003546101c7906001600160a01b031681565b6000610333838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002546040516bffffffffffffffffffffffff1960608b901b1660208201529092506034019050604051602081830303815290604052805190602001206105fd565b949350505050565b610343610613565b6040514790600090730f789fbca6d2fb9207b795154b04aa8a02b9d40d9083908381818185875af1925050503d806000811461039b576040519150601f19603f3d011682016040523d82523d6000602084013e6103a0565b606091505b50509050806103c25760405163d23a9e8960e01b815260040160405180910390fd5b5050565b6103ce610613565b6103d8600061066d565b565b6702ea11e32ad50000803410156104045760405163356680b760e01b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000043101561044557604051630314872760e11b815260040160405180910390fd5b6001546001146104895760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b60448201526064015b60405180910390fd5b60026001556104966106bd565b5060018055565b66f8b0a10e470000803410156104c65760405163356680b760e01b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000043101561050757604051630314872760e11b815260040160405180910390fd5b6001546001146105465760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610480565b60026001556105563384846102bb565b61057357604051630e5060e160e21b815260040160405180910390fd5b61057b6106bd565b50506001805550565b61058c610613565b6001600160a01b0381166105f15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610480565b6105fa8161066d565b50565b60008261060a858461079a565b14949350505050565b6000546001600160a01b031633146103d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610480565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3360009081526004602052604090205460ff16156106ee57604051631bbdf5c560e31b815260040160405180910390fd5b33600081815260046020819052604091829020805460ff191660019081179091556003549251630ab714fb60e11b8152918201939093527f0000000000000000000000000000000000000000000000000000000000000000602482015260448101929092526001600160a01b03169063156e29f690606401600060405180830381600087803b15801561078057600080fd5b505af1158015610794573d6000803e3d6000fd5b50505050565b600081815b84518110156107df576107cb828683815181106107be576107be610931565b60200260200101516107e7565b9150806107d781610947565b91505061079f565b509392505050565b6000818310610803576000828152602084905260409020610812565b60008381526020839052604090205b9392505050565b80356001600160a01b038116811461083057600080fd5b919050565b60006020828403121561084757600080fd5b61081282610819565b60008083601f84011261086257600080fd5b50813567ffffffffffffffff81111561087a57600080fd5b6020830191508360208260051b850101111561089557600080fd5b9250929050565b6000806000604084860312156108b157600080fd5b6108ba84610819565b9250602084013567ffffffffffffffff8111156108d657600080fd5b6108e286828701610850565b9497909650939450505050565b6000806020838503121561090257600080fd5b823567ffffffffffffffff81111561091957600080fd5b61092585828601610850565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161096757634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122038631a44005e9163c757b5bc15c06d0f726d8b4416a9033acd4f335d699a4c4a64736f6c63430008100033482ea385be2534d333dec87a021f311b2cd695e9846db720ee4d74e1f2ad1d130000000000000000000000009ecd98d3e25c8844604526dfc5c03606230b34f80000000000000000000000000000000000000000000000000000000000eb73640000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c80636817c76c1161007f5780638da5cb5b116100595780638da5cb5b1461024a578063d338b03c14610268578063f2fde38b1461027b578063f53d9eff1461029b57600080fd5b80636817c76c14610211578063715018a61461022d5780638c874ebd1461024257600080fd5b80632eb4a7ab116100bb5780632eb4a7ab1461018957806338af3eed1461019f5780633ccfd60b146101df57806361bd3867146101f657600080fd5b80631e7269c5146100e2578063247155ff14610127578063255e468514610147575b600080fd5b3480156100ee57600080fd5b506101126100fd366004610835565b60046020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013357600080fd5b5061011261014236600461089c565b6102bb565b34801561015357600080fd5b5061017b7f0000000000000000000000000000000000000000000000000000000000eb736481565b60405190815260200161011e565b34801561019557600080fd5b5061017b60025481565b3480156101ab57600080fd5b506101c7730f789fbca6d2fb9207b795154b04aa8a02b9d40d81565b6040516001600160a01b03909116815260200161011e565b3480156101eb57600080fd5b506101f461033b565b005b34801561020257600080fd5b5061017b66f8b0a10e47000081565b34801561021d57600080fd5b5061017b6702ea11e32ad5000081565b34801561023957600080fd5b506101f46103c6565b6101f46103da565b34801561025657600080fd5b506000546001600160a01b03166101c7565b6101f46102763660046108ef565b61049d565b34801561028757600080fd5b506101f4610296366004610835565b610584565b3480156102a757600080fd5b506003546101c7906001600160a01b031681565b6000610333838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002546040516bffffffffffffffffffffffff1960608b901b1660208201529092506034019050604051602081830303815290604052805190602001206105fd565b949350505050565b610343610613565b6040514790600090730f789fbca6d2fb9207b795154b04aa8a02b9d40d9083908381818185875af1925050503d806000811461039b576040519150601f19603f3d011682016040523d82523d6000602084013e6103a0565b606091505b50509050806103c25760405163d23a9e8960e01b815260040160405180910390fd5b5050565b6103ce610613565b6103d8600061066d565b565b6702ea11e32ad50000803410156104045760405163356680b760e01b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000eb736443101561044557604051630314872760e11b815260040160405180910390fd5b6001546001146104895760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b60448201526064015b60405180910390fd5b60026001556104966106bd565b5060018055565b66f8b0a10e470000803410156104c65760405163356680b760e01b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000eb736443101561050757604051630314872760e11b815260040160405180910390fd5b6001546001146105465760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610480565b60026001556105563384846102bb565b61057357604051630e5060e160e21b815260040160405180910390fd5b61057b6106bd565b50506001805550565b61058c610613565b6001600160a01b0381166105f15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610480565b6105fa8161066d565b50565b60008261060a858461079a565b14949350505050565b6000546001600160a01b031633146103d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610480565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3360009081526004602052604090205460ff16156106ee57604051631bbdf5c560e31b815260040160405180910390fd5b33600081815260046020819052604091829020805460ff191660019081179091556003549251630ab714fb60e11b8152918201939093527f0000000000000000000000000000000000000000000000000000000000000001602482015260448101929092526001600160a01b03169063156e29f690606401600060405180830381600087803b15801561078057600080fd5b505af1158015610794573d6000803e3d6000fd5b50505050565b600081815b84518110156107df576107cb828683815181106107be576107be610931565b60200260200101516107e7565b9150806107d781610947565b91505061079f565b509392505050565b6000818310610803576000828152602084905260409020610812565b60008381526020839052604090205b9392505050565b80356001600160a01b038116811461083057600080fd5b919050565b60006020828403121561084757600080fd5b61081282610819565b60008083601f84011261086257600080fd5b50813567ffffffffffffffff81111561087a57600080fd5b6020830191508360208260051b850101111561089557600080fd5b9250929050565b6000806000604084860312156108b157600080fd5b6108ba84610819565b9250602084013567ffffffffffffffff8111156108d657600080fd5b6108e286828701610850565b9497909650939450505050565b6000806020838503121561090257600080fd5b823567ffffffffffffffff81111561091957600080fd5b61092585828601610850565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161096757634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122038631a44005e9163c757b5bc15c06d0f726d8b4416a9033acd4f335d699a4c4a64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
482ea385be2534d333dec87a021f311b2cd695e9846db720ee4d74e1f2ad1d130000000000000000000000009ecd98d3e25c8844604526dfc5c03606230b34f80000000000000000000000000000000000000000000000000000000000eb73640000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _merkleRoot (bytes32): 0x482ea385be2534d333dec87a021f311b2cd695e9846db720ee4d74e1f2ad1d13
Arg [1] : _particles (address): 0x9ECd98D3E25C8844604526DFc5C03606230b34F8
Arg [2] : _mintStart (uint256): 15430500
Arg [3] : _tokenId (uint256): 1
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 482ea385be2534d333dec87a021f311b2cd695e9846db720ee4d74e1f2ad1d13
Arg [1] : 0000000000000000000000009ecd98d3e25c8844604526dfc5c03606230b34f8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000eb7364
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,262.44 | 0.84 | $2,740.45 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.