Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,022 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Enter Fracture | 18278178 | 450 days ago | IN | 0 ETH | 0.00048953 | ||||
Enter Fracture | 18278178 | 450 days ago | IN | 0 ETH | 0.00048953 | ||||
Enter Fracture | 18278178 | 450 days ago | IN | 0 ETH | 0.00048953 | ||||
Enter Fracture | 17296768 | 588 days ago | IN | 0 ETH | 0.00075788 | ||||
Pause | 17295557 | 588 days ago | IN | 0 ETH | 0.0016126 | ||||
Enter Fracture | 17295445 | 588 days ago | IN | 0 ETH | 0.00592551 | ||||
Enter Fracture | 17295442 | 588 days ago | IN | 0 ETH | 0.00621675 | ||||
Enter Fracture | 17295442 | 588 days ago | IN | 0 ETH | 0.00728408 | ||||
Enter Fracture | 17295441 | 588 days ago | IN | 0 ETH | 0.01074786 | ||||
Enter Fracture | 17295441 | 588 days ago | IN | 0 ETH | 0.00610306 | ||||
Enter Fracture | 17295429 | 588 days ago | IN | 0 ETH | 0.00621861 | ||||
Enter Fracture | 17295407 | 588 days ago | IN | 0 ETH | 0.00565299 | ||||
Enter Fracture | 17295407 | 588 days ago | IN | 0 ETH | 0.00565299 | ||||
Enter Fracture | 17295403 | 588 days ago | IN | 0 ETH | 0.00612403 | ||||
Enter Fracture | 17295402 | 588 days ago | IN | 0 ETH | 0.0058528 | ||||
Enter Fracture | 17295401 | 588 days ago | IN | 0 ETH | 0.00610809 | ||||
Enter Fracture | 17295394 | 588 days ago | IN | 0 ETH | 0.00648982 | ||||
Enter Fracture | 17295393 | 588 days ago | IN | 0 ETH | 0.00614475 | ||||
Enter Fracture | 17295391 | 588 days ago | IN | 0 ETH | 0.00646188 | ||||
Enter Fracture | 17295384 | 588 days ago | IN | 0 ETH | 0.00672539 | ||||
Enter Fracture | 17295382 | 588 days ago | IN | 0 ETH | 0.00785968 | ||||
Enter Fracture | 17295378 | 588 days ago | IN | 0 ETH | 0.00697275 | ||||
Enter Fracture | 17295371 | 588 days ago | IN | 0 ETH | 0.00725292 | ||||
Enter Fracture | 17295368 | 588 days ago | IN | 0 ETH | 0.00719531 | ||||
Enter Fracture | 17295360 | 588 days ago | IN | 0 ETH | 0.00726558 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
17282990 | 589 days ago | 0.01647695 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x561dbE92...EaF3D68fe The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
IntoTheFracture
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '../utils/IDelegationRegistry.sol'; import '../interface/ICoolERC721A.sol'; import '../interface/IFractures.sol'; /// @title Into The Fracture /// @author Adam Goodman /// @notice This contract allows the burning of Cool Cats Fractures for Shadow Wolves contract IntoTheFracture is Ownable, Pausable { IFractures public _fractures; ICoolERC721A public _shadowWolves; IDelegationRegistry public _delegationRegistry; bytes32 public _merkleRoot; bool public _allowlistEnabled; uint256 public _burnWindowStart; uint256 public _burnWindowEnd; uint256 public _maxBurnAmount = 100; // Mapping to only allow a merkle proof array to be used once. // Merkle proofs are not guaranteed to be unique to a specific Merkle root. So store them by root. mapping(bytes32 => mapping(bytes32 => bool)) public _usedMerkleProofs; error AllowlistEnabled(); error MaxBurnExceeded(); error BurnWindowNotStarted(); error BurnWindowEnded(); error InvalidBurnWindow(); error InvalidMerkleProof(); error MaxBurnAmountZero(); error NullMerkleRoot(); error NotFractureOwnerNorApproved(address account, uint256 fractureId); event AllowlistEnabledSet(bool allowlistEnabled); event BurnWindowSet(uint256 burnWindowStart, uint256 burnWindowEnd); event DelegateRegistryAddressSet(address delegationRegistry); event FractureAddressSet(address fractures); event FractureEntered(uint256[] fractureIds, uint256 firstId); event MaxBurnAmountSet(uint256 maxBurnAmount); event MerkleRootSet(bytes32 merkleRoot); event ShadowWolvesAddressSet(address shadowWolves); /// @dev Set merkleRoot to the null bytes32 to disable the allowlist /// Any other value will enable the allowlist by default constructor( address fractures, address shadowWolves, address delegationRegistry, uint64 burnWindowStart, uint64 burnWindowEnd, bytes32 merkleRoot ) { _fractures = IFractures(fractures); _shadowWolves = ICoolERC721A(shadowWolves); _delegationRegistry = IDelegationRegistry(delegationRegistry); setBurnWindow(burnWindowStart, burnWindowEnd); if (merkleRoot != bytes32(0)) { _merkleRoot = merkleRoot; _allowlistEnabled = true; } _pause(); } /// @notice Modifier to check if the burn window is open, otherwise revert modifier withinBurnWindow() { if (block.timestamp < _burnWindowStart) { revert BurnWindowNotStarted(); } if (block.timestamp > _burnWindowEnd) { revert BurnWindowEnded(); } _; } /// @notice Verify merkleProof submitted by a sender /// @param sender The account being verified /// @param merkleProof Merkle data to verify against modifier hasValidMerkleProof(address sender, bytes32[] calldata merkleProof) { if (_allowlistEnabled) { if (!isValidMerkleProof(sender, merkleProof)) { revert InvalidMerkleProof(); } // bytes32 unique identifier for each merkle proof bytes32 node = keccak256(abi.encodePacked(sender)); if (_usedMerkleProofs[_merkleRoot][node]) { revert InvalidMerkleProof(); } _usedMerkleProofs[_merkleRoot][node] = true; } _; } /// @notice Burns given Fractures and mints Shadow Wolves /// @param fractureIds The Fractures to burn /// @param merkleProof The merkle proof for the given address /// @dev If the allowlist is enabled, the merkle proof must be valid, otherwise it will revert /// if the allowlist is disabled, the merkle proof will be ignored, so it can be an empty array. /// To avoid reentrancy attacks, the fractures are burned before the Shadow Wolves are minted. function enterFracture( uint256[] calldata fractureIds, bytes32[] calldata merkleProof ) external whenNotPaused withinBurnWindow hasValidMerkleProof(msg.sender, merkleProof) { uint256 len = fractureIds.length; // Prevent gas out for large burns if (len > _maxBurnAmount) revert MaxBurnExceeded(); uint256 nextTokenId = _shadowWolves.nextTokenId(); address owner; uint256 i; unchecked { do { // Check that the fracture owner is the sender or the sender is approved, otherwise revert. If a user approves // another account to manage their fractures, the owner of the fracture will receive the Shadow Wolf. // - the `_getOwnerIfApproved` function either returns an address or reverts owner = _getOwnerIfApproved(fractureIds[i]); _fractures.burn(fractureIds[i]); _shadowWolves.mint(owner, 1); } while (++i < len); } emit FractureEntered(fractureIds, nextTokenId); } /// @notice Sets the merkle root for the allowlist /// @dev Only the owner can call this function, setting the merkle root does not change /// whether the allowlist is enabled or not /// @param merkleRoot The new merkle root function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { if (_allowlistEnabled && merkleRoot == bytes32(0)) { revert AllowlistEnabled(); } _merkleRoot = merkleRoot; emit MerkleRootSet(merkleRoot); } /// @notice Sets whether the allowlist is enabled or not /// @dev Only the owner can call this function /// @param allowlistEnabled Whether the allowlist is enabled or not function setAllowlistEnabled(bool allowlistEnabled) external onlyOwner { if (allowlistEnabled && _merkleRoot == bytes32(0)) { revert NullMerkleRoot(); } _allowlistEnabled = allowlistEnabled; emit AllowlistEnabledSet(allowlistEnabled); } /// @notice Sets the maximum number of tokens that can be burned in a single transaction /// @dev Only the owner can call this function /// @param maxBurnAmount The maximum number of tokens that can be burned in a single transaction function setMaxBurnAmount(uint256 maxBurnAmount) external onlyOwner { // Can't set max burn amount to zero, we have pause to stop minting if (maxBurnAmount == 0) revert MaxBurnAmountZero(); _maxBurnAmount = maxBurnAmount; emit MaxBurnAmountSet(maxBurnAmount); } /// @notice Pauses the contract - stopping minting via the public mint function /// @dev Only the owner can call this function /// Emit handled by {OpenZepplin Pausable} function pause() external onlyOwner { _pause(); } /// @notice Unpauses the contract - allowing minting via the public mint function /// @dev Only the owner can call this function /// Emit handled by {OpenZepplin Pausable} function unpause() external onlyOwner { _unpause(); } /// @notice Sets the address of the Fractures contract /// @dev Only the owner can call this function /// @param fractures The address of the Fractures contract function setFracturesAddress(address fractures) external onlyOwner { _fractures = IFractures(fractures); emit FractureAddressSet(fractures); } /// @notice Sets the address of the Shadow Wolves contract /// @dev Only the owner can call this function /// @param shadowWolves The address of the Shadow Wolves contract function setShadowWolvesAddress(address shadowWolves) external onlyOwner { _shadowWolves = ICoolERC721A(shadowWolves); emit ShadowWolvesAddressSet(shadowWolves); } /// @notice Sets the address of the Delegation Registry contract /// @dev Only the owner can call this function /// @param delegateRegistry The address of the Delegation Registry contract function setDelegateRegistryAddress(address delegateRegistry) external onlyOwner { _delegationRegistry = IDelegationRegistry(delegateRegistry); emit DelegateRegistryAddressSet(delegateRegistry); } /// @notice Sets the burn window, start and end times are in seconds since unix epoch /// @dev Only the owner can call this function /// @param burnWindowStart The start time of the burn window /// @param burnWindowEnd The end time of the burn window function setBurnWindow(uint256 burnWindowStart, uint256 burnWindowEnd) public onlyOwner { if (burnWindowEnd < burnWindowStart) { revert InvalidBurnWindow(); } _burnWindowStart = burnWindowStart; _burnWindowEnd = burnWindowEnd; emit BurnWindowSet(burnWindowStart, burnWindowEnd); } /// @notice Checks if a given address is on the merkle tree allowlist /// @dev Merkle trees can be generated using https://github.com/OpenZeppelin/merkle-tree /// @param account The address to check /// @param merkleProof The merkle proof to check /// @return Whether the address is on the allowlist or not function isValidMerkleProof( address account, bytes32[] calldata merkleProof ) public view virtual returns (bool) { return MerkleProof.verifyCalldata( merkleProof, _merkleRoot, keccak256(bytes.concat(keccak256(abi.encode(account)))) ); } /// @notice Checks if a given Fracture is owned by or approved for the sender /// @dev This can be used to stop users from being able to burn Fractures someone else owns without their permission /// @param tokenId The Fracture to check /// @return The owner of the token function _getOwnerIfApproved(uint256 tokenId) internal view returns (address) { address owner = _fractures.ownerOf(tokenId); if (owner == msg.sender) { return owner; } if ( _delegationRegistry.checkDelegateForToken(msg.sender, owner, address(_fractures), tokenId) ) { return owner; } if (_fractures.isApprovedForAll(owner, msg.sender)) { return owner; } if (_fractures.getApproved(tokenId) == msg.sender) { return owner; } revert NotFractureOwnerNorApproved(msg.sender, tokenId); } }
// 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: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// 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: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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 simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _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}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 pragma solidity ^0.8.17; interface ICoolERC721A { /// @notice Mint an amount of tokens to the given address /// @dev Can only be called by an account with the MINTER_ROLE /// Will revert if called when paused, see _beforeTokenTransfer /// @param to The address to mint the token to /// @param amount The amount of tokens to mint function mint(address to, uint256 amount) external; /// @notice Externally exposes the _nextTokenId function /// @dev used for referencing when burning fractures /// @return The next token id function nextTokenId() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IFractures { /// @dev Burns `tokenId`. See {ERC721A-_burn}. /// Requirements: /// - The caller must own `tokenId` or be an approved operator. function burn(uint256 tokenId) external; /// @dev Returns the owner of the `tokenId` token. /// Requirements: /// - `tokenId` must exist. function ownerOf(uint256 tokenId) external view returns (address owner); /// @dev Returns the account approved for `tokenId` token. /// Requirements: /// - `tokenId` must exist. function getApproved(uint256 tokenId) external view returns (address operator); /// @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.17; /** * @title An immutable registry contract to be deployed as a standalone primitive * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations * from here and integrate those permissions into their flow */ interface IDelegationRegistry { /// @notice Delegation type enum DelegationType { NONE, ALL, CONTRACT, TOKEN } /// @notice Info about a single delegation, used for onchain enumeration struct DelegationInfo { DelegationType type_; address vault; address delegate; address contract_; uint256 tokenId; } /// @notice Info about a single contract-level delegation struct ContractDelegation { address contract_; address delegate; } /// @notice Info about a single token-level delegation struct TokenDelegation { address contract_; uint256 tokenId; address delegate; } /// @notice Emitted when a user delegates their entire wallet event DelegateForAll(address vault, address delegate, bool value); /// @notice Emitted when a user delegates a specific contract event DelegateForContract(address vault, address delegate, address contract_, bool value); /// @notice Emitted when a user delegates a specific token event DelegateForToken( address vault, address delegate, address contract_, uint256 tokenId, bool value ); /// @notice Emitted when a user revokes all delegations event RevokeAllDelegates(address vault); /// @notice Emitted when a user revoes all delegations for a given delegate event RevokeDelegate(address vault, address delegate); /** * ----------- WRITE ----------- */ /** * @notice Allow the delegate to act on your behalf for all contracts * @param delegate The hotwallet to act on your behalf * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForAll(address delegate, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific contract * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForContract(address delegate, address contract_, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific token * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForToken( address delegate, address contract_, uint256 tokenId, bool value ) external; /** * @notice Revoke all delegates */ function revokeAllDelegates() external; /** * @notice Revoke a specific delegate for all their permissions * @param delegate The hotwallet to revoke */ function revokeDelegate(address delegate) external; /** * @notice Remove yourself as a delegate for a specific vault * @param vault The vault which delegated to the msg.sender, and should be removed */ function revokeSelf(address vault) external; /** * ----------- READ ----------- */ /** * @notice Returns all active delegations a given delegate is able to claim on behalf of * @param delegate The delegate that you would like to retrieve delegations for * @return info Array of DelegationInfo structs */ function getDelegationsByDelegate( address delegate ) external view returns (DelegationInfo[] memory); /** * @notice Returns an array of wallet-level delegates for a given vault * @param vault The cold wallet who issued the delegation * @return addresses Array of wallet-level delegates for a given vault */ function getDelegatesForAll(address vault) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault and contract * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract you're delegating * @return addresses Array of contract-level delegates for a given vault and contract */ function getDelegatesForContract( address vault, address contract_ ) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault's token * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract holding the token * @param tokenId The token id for the token you're delegating * @return addresses Array of contract-level delegates for a given vault's token */ function getDelegatesForToken( address vault, address contract_, uint256 tokenId ) external view returns (address[] memory); /** * @notice Returns all contract-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of ContractDelegation structs */ function getContractLevelDelegations( address vault ) external view returns (ContractDelegation[] memory delegations); /** * @notice Returns all token-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of TokenDelegation structs */ function getTokenLevelDelegations( address vault ) external view returns (TokenDelegation[] memory delegations); /** * @notice Returns true if the address is delegated to act on the entire vault * @param delegate The hotwallet to act on your behalf * @param vault The cold wallet who issued the delegation */ function checkDelegateForAll(address delegate, address vault) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForContract( address delegate, address vault, address contract_ ) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForToken( address delegate, address vault, address contract_, uint256 tokenId ) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"fractures","type":"address"},{"internalType":"address","name":"shadowWolves","type":"address"},{"internalType":"address","name":"delegationRegistry","type":"address"},{"internalType":"uint64","name":"burnWindowStart","type":"uint64"},{"internalType":"uint64","name":"burnWindowEnd","type":"uint64"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowlistEnabled","type":"error"},{"inputs":[],"name":"BurnWindowEnded","type":"error"},{"inputs":[],"name":"BurnWindowNotStarted","type":"error"},{"inputs":[],"name":"InvalidBurnWindow","type":"error"},{"inputs":[],"name":"InvalidMerkleProof","type":"error"},{"inputs":[],"name":"MaxBurnAmountZero","type":"error"},{"inputs":[],"name":"MaxBurnExceeded","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"fractureId","type":"uint256"}],"name":"NotFractureOwnerNorApproved","type":"error"},{"inputs":[],"name":"NullMerkleRoot","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"allowlistEnabled","type":"bool"}],"name":"AllowlistEnabledSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"burnWindowStart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnWindowEnd","type":"uint256"}],"name":"BurnWindowSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"delegationRegistry","type":"address"}],"name":"DelegateRegistryAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"fractures","type":"address"}],"name":"FractureAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"fractureIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"firstId","type":"uint256"}],"name":"FractureEntered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxBurnAmount","type":"uint256"}],"name":"MaxBurnAmountSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"MerkleRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"shadowWolves","type":"address"}],"name":"ShadowWolvesAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"_allowlistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_burnWindowEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_burnWindowStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_delegationRegistry","outputs":[{"internalType":"contract IDelegationRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_fractures","outputs":[{"internalType":"contract IFractures","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxBurnAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_shadowWolves","outputs":[{"internalType":"contract ICoolERC721A","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"_usedMerkleProofs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"fractureIds","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"enterFracture","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"isValidMerkleProof","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"allowlistEnabled","type":"bool"}],"name":"setAllowlistEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"burnWindowStart","type":"uint256"},{"internalType":"uint256","name":"burnWindowEnd","type":"uint256"}],"name":"setBurnWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegateRegistry","type":"address"}],"name":"setDelegateRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fractures","type":"address"}],"name":"setFracturesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxBurnAmount","type":"uint256"}],"name":"setMaxBurnAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"shadowWolves","type":"address"}],"name":"setShadowWolvesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638916173b116100c3578063c7cdde601161007c578063c7cdde60146102bf578063d187f417146102d2578063d7644ba2146102db578063def50f6c146102ee578063e99fa84814610301578063f2fde38b1461031457600080fd5b80638916173b146102695780638da5cb5b1461027c5780638e4520b11461028d5780639b6dd02c14610296578063a0bfb3851461029f578063af99ae99146102ac57600080fd5b80635bd9ad65116101155780635bd9ad65146101e75780635c975abb146101fa578063715018a61461021857806377b897bd146102205780637cb647591461024e5780638456cb591461026157600080fd5b806303ced9fa1461015d5780632fc37ab2146101725780633e82c6df1461018e5780633f4ba83a146101b95780633fd28f04146101c15780634acd87d5146101d4575b600080fd5b61017061016b366004610ece565b610327565b005b61017b60045481565b6040519081526020015b60405180910390f35b6001546101a1906001600160a01b031681565b6040516001600160a01b039091168152602001610185565b610170610384565b6101706101cf366004610eeb565b610396565b6101706101e2366004610f0d565b610406565b6101706101f5366004610ece565b610464565b600054600160a01b900460ff165b6040519015158152602001610185565b6101706104ba565b61020861022e366004610eeb565b600960209081526000928352604080842090915290825290205460ff1681565b61017061025c366004610f0d565b6104cc565b610170610537565b6003546101a1906001600160a01b031681565b6000546001600160a01b03166101a1565b61017b60075481565b61017b60065481565b6005546102089060ff1681565b6101706102ba366004610f72565b610547565b6101706102cd366004610ece565b61085d565b61017b60085481565b6101706102e9366004610fec565b6108b3565b6102086102fc366004611009565b610927565b6002546101a1906001600160a01b031681565b610170610322366004610ece565b61098a565b61032f610a08565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f932f27f9c5cb7dbe3caaccb069d26507203ec945a34d2947ca15386e6ba56dba906020015b60405180910390a150565b61038c610a08565b610394610a62565b565b61039e610a08565b818110156103bf57604051630af251a960e21b815260040160405180910390fd5b6006829055600781905560408051838152602081018390527ff789c5c0eeb996ec1d8492b13118626f794210c5e9861cc10dddde30eb1d6706910160405180910390a15050565b61040e610a08565b8060000361042f5760405163f2ab4c4960e01b815260040160405180910390fd5b60088190556040518181527f3b401f3671800e66e06e911de0839c9b29f8c8a3e5cdace17b1517bfe01fc07790602001610379565b61046c610a08565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527faa7b763522346ef42e6e7d0fac1a5ccd67921e5e397933dd6539fc99ee8094d690602001610379565b6104c2610a08565b6103946000610ab7565b6104d4610a08565b60055460ff1680156104e4575080155b1561050257604051638a943acd60e01b815260040160405180910390fd5b60048190556040518181527f42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b90602001610379565b61053f610a08565b610394610b07565b61054f610b4a565b600654421015610572576040516374c49cc160e11b815260040160405180910390fd5b6007544211156105955760405163abed54db60e01b815260040160405180910390fd5b60055433908390839060ff161561066b576105b1838383610927565b6105ce5760405163582f497d60e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606085901b16602082015260009060340160408051601f19818403018152918152815160209283012060045460009081526009845282812082825290935291205490915060ff16156106445760405163582f497d60e11b815260040160405180910390fd5b600454600090815260096020908152604080832093835292905220805460ff191660011790555b60085486908111156106905760405163f4ff27fb60e01b815260040160405180910390fd5b60025460408051631d5e528f60e21b815290516000926001600160a01b0316916375794a3c9160048083019260209291908290030181865afa1580156106da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fe919061105e565b90506000805b6107258b8b8381811061071957610719611077565b90506020020135610b97565b6001549092506001600160a01b03166342966c688c8c8481811061074b5761074b611077565b905060200201356040518263ffffffff1660e01b815260040161077091815260200190565b600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b50506002546040516340c10f1960e01b81526001600160a01b0386811660048301526001602483015290911692506340c10f199150604401600060405180830381600087803b1580156107f057600080fd5b505af1158015610804573d6000803e3d6000fd5b50505050838160010191508110610704577f11d57f00dcd343388bffc085d63dc154a13b9e143d62fd7e746e70589b71c0fa8b8b856040516108489392919061108d565b60405180910390a15050505050505050505050565b610865610a08565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f80c2ad5aaf42adf556b84967f7482790a82b0a63d9f60e6d8de13ed58d2dc06c90602001610379565b6108bb610a08565b8080156108c85750600454155b156108e6576040516360a2b2e360e01b815260040160405180910390fd5b6005805460ff19168215159081179091556040519081527fa1bf86c493917580dec207969ef59976f0c378f10ece581237f19acfbd858f1c90602001610379565b600454604080516001600160a01b03861660208201526000926109829286928692910160408051601f198184030181528282528051602091820120908301520160405160208183030381529060405280519060200120610dd3565b949350505050565b610992610a08565b6001600160a01b0381166109fc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610a0581610ab7565b50565b6000546001600160a01b031633146103945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109f3565b610a6a610deb565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b0f610b4a565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a9a3390565b600054600160a01b900460ff16156103945760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109f3565b6001546040516331a9108f60e11b81526004810183905260009182916001600160a01b0390911690636352211e90602401602060405180830381865afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0991906110cb565b9050336001600160a01b03821603610c215792915050565b600354600154604051631574d39f60e31b81523360048201526001600160a01b03848116602483015291821660448201526064810186905291169063aba69cf890608401602060405180830381865afa158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca691906110e8565b15610cb15792915050565b60015460405163e985e9c560e01b81526001600160a01b0383811660048301523360248301529091169063e985e9c590604401602060405180830381865afa158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2591906110e8565b15610d305792915050565b60015460405163020604bf60e21b81526004810185905233916001600160a01b03169063081812fc90602401602060405180830381865afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d91906110cb565b6001600160a01b031603610db15792915050565b60405163767a14eb60e01b8152336004820152602481018490526044016109f3565b600082610de1868685610e3b565b1495945050505050565b600054600160a01b900460ff166103945760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109f3565b600081815b84811015610e7e57610e6a82878784818110610e5e57610e5e611077565b90506020020135610e87565b915080610e7681611105565b915050610e40565b50949350505050565b6000818310610ea3576000828152602084905260409020610eb2565b60008381526020839052604090205b9392505050565b6001600160a01b0381168114610a0557600080fd5b600060208284031215610ee057600080fd5b8135610eb281610eb9565b60008060408385031215610efe57600080fd5b50508035926020909101359150565b600060208284031215610f1f57600080fd5b5035919050565b60008083601f840112610f3857600080fd5b50813567ffffffffffffffff811115610f5057600080fd5b6020830191508360208260051b8501011115610f6b57600080fd5b9250929050565b60008060008060408587031215610f8857600080fd5b843567ffffffffffffffff80821115610fa057600080fd5b610fac88838901610f26565b90965094506020870135915080821115610fc557600080fd5b50610fd287828801610f26565b95989497509550505050565b8015158114610a0557600080fd5b600060208284031215610ffe57600080fd5b8135610eb281610fde565b60008060006040848603121561101e57600080fd5b833561102981610eb9565b9250602084013567ffffffffffffffff81111561104557600080fd5b61105186828701610f26565b9497909650939450505050565b60006020828403121561107057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6040808252810183905260006001600160fb1b038411156110ad57600080fd5b8360051b808660608501376020830193909352500160600192915050565b6000602082840312156110dd57600080fd5b8151610eb281610eb9565b6000602082840312156110fa57600080fd5b8151610eb281610fde565b60006001820161112557634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220d4cb86f8d59948e481b57da0b4d434b6ade9c0a6602c49404cd36651fcd959fc64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.