Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StaticMintFeePredicateCloneable
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import { ICollectionCloneable } from "../../interfaces/ICollectionCloneable.sol"; import { ICollectionNFTMintFeePredicate } from "../../interfaces/ICollectionNFTMintFeePredicate.sol"; import { ICollection } from "../../interfaces/ICollection.sol"; import { IHashes } from "../../interfaces/IHashes.sol"; /** * @title StaticMintFeePredicateCloneable * @author David Matheson * @notice This is a helper contract used to provide mint fee logic upon instantiating a new * contract from CollectionNFTCloneableV1 to create a new Hashes NFT collection. * This contract includes a function, getTokenMintFee, where a mint fee is provided * and the function will then return the mint fee to initialize it within the associated contract. */ contract StaticMintFeePredicateCloneable is ICollectionCloneable, ICollectionNFTMintFeePredicate, ICollection { bool _initialized; uint256 public mintFee; function initialize( IHashes, address, address, bytes memory _initializationData ) external override { require(!_initialized, "StaticMintFeePredicateCloneable: already initialized."); (mintFee) = abi.decode(_initializationData, (uint256)); _initialized = true; } /** * @notice This predicate function is used to provide the mint free of a new hashes collection by * returning the mint fee provided during initialization. * @param _tokenId The token Id of the associated hashes collection contract. * @param _hashesTokenId The hashes token Id being used to mint. * * @return The mint fee provided during initialization. */ function getTokenMintFee(uint256 _tokenId, uint256 _hashesTokenId) external view override returns (uint256) { require(_initialized, "StaticMintFeePredicateCloneable: not initialized."); return mintFee; } /** * @notice This function is used by the Factory to verify the format of ecosystem settings * @param _settings ABI encoded ecosystem settings data. This should be empty for the 'Default' ecosystem. * * @return The boolean result of the validation. */ function verifyEcosystemSettings(bytes memory _settings) external pure override returns (bool) { return _settings.length == 0; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import { IHashes } from "./IHashes.sol"; interface ICollectionCloneable { function initialize( IHashes _hashesToken, address _factoryMaintainerAddress, address _createCollectionCaller, bytes memory _initializationData ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface ICollectionNFTMintFeePredicate { function getTokenMintFee(uint256 _tokenId, uint256 _hashesTokenId) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface ICollection { function verifyEcosystemSettings(bytes memory _settings) external pure returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import { IERC721Enumerable } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; interface IHashes is IERC721Enumerable { function deactivateTokens( address _owner, uint256 _proposalId, bytes memory _signature ) external returns (uint256); function deactivated(uint256 _tokenId) external view returns (bool); function activationFee() external view returns (uint256); function verify( uint256 _tokenId, address _minter, string memory _phrase ) external view returns (bool); function getHash(uint256 _tokenId) external view returns (bytes32); function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function governanceCap() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 1000000, "details": { "yul": false, "deduplicate": true, "cse": true, "constantOptimizer": true } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_hashesTokenId","type":"uint256"}],"name":"getTokenMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IHashes","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes","name":"_initializationData","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_settings","type":"bytes"}],"name":"verifyEcosystemSettings","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506105b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806304eff22f1461005157806313966db51461007a5780631cc1fddb14610090578063246581f7146100a3575b600080fd5b61006461005f366004610229565b511590565b6040516100719190610408565b60405180910390f35b61008360015481565b6040516100719190610436565b61008361009e366004610304565b6100b8565b6100b66100b1366004610264565b610109565b005b6000805460ff166100fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f590610416565b60405180910390fd5b506001545b92915050565b60005460ff1615610146576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f590610426565b8080602001905181019061015a91906102e3565b6001908155600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905550505050565b60006101a361019e84610460565b610444565b9050828152602081018484840111156101be576101be600080fd5b6101c98482856104d2565b509392505050565b803561010381610558565b600082601f8301126101f0576101f0600080fd5b8135610200848260208601610190565b949350505050565b80356101038161056f565b803561010381610578565b805161010381610578565b60006020828403121561023e5761023e600080fd5b813567ffffffffffffffff81111561025857610258600080fd5b610200848285016101dc565b6000806000806080858703121561027d5761027d600080fd5b60006102898787610208565b945050602061029a878288016101d1565b93505060406102ab878288016101d1565b925050606085013567ffffffffffffffff8111156102cb576102cb600080fd5b6102d7878288016101dc565b91505092959194509250565b6000602082840312156102f8576102f8600080fd5b6000610200848461021e565b6000806040838503121561031a5761031a600080fd5b60006103268585610213565b925050602061033785828601610213565b9150509250929050565b8015155b82525050565b603181526000602082017f5374617469634d696e74466565507265646963617465436c6f6e6561626c653a81527f206e6f7420696e697469616c697a65642e000000000000000000000000000000602082015291505b5060400190565b603581526000602082017f5374617469634d696e74466565507265646963617465436c6f6e6561626c653a81527f20616c726561647920696e697469616c697a65642e0000000000000000000000602082015291506103a1565b80610345565b602081016101038284610341565b602080825281016101038161034b565b60208082528101610103816103a8565b602081016101038284610402565b600061044f60405190565b905061045b82826104de565b919050565b600067ffffffffffffffff82111561047a5761047a610529565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011660200192915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610103565b6000610103826104a9565b82818337506000910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561052257610522610529565b6040525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610561816104a9565b811461056c57600080fd5b50565b610561816104c7565b8061056156fea26469706673582212206adbbf46a62b1d5b4c0a617479b794e22fb3ac9df212634f4ded6a2388b94e3064736f6c63430008060033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806304eff22f1461005157806313966db51461007a5780631cc1fddb14610090578063246581f7146100a3575b600080fd5b61006461005f366004610229565b511590565b6040516100719190610408565b60405180910390f35b61008360015481565b6040516100719190610436565b61008361009e366004610304565b6100b8565b6100b66100b1366004610264565b610109565b005b6000805460ff166100fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f590610416565b60405180910390fd5b506001545b92915050565b60005460ff1615610146576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f590610426565b8080602001905181019061015a91906102e3565b6001908155600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905550505050565b60006101a361019e84610460565b610444565b9050828152602081018484840111156101be576101be600080fd5b6101c98482856104d2565b509392505050565b803561010381610558565b600082601f8301126101f0576101f0600080fd5b8135610200848260208601610190565b949350505050565b80356101038161056f565b803561010381610578565b805161010381610578565b60006020828403121561023e5761023e600080fd5b813567ffffffffffffffff81111561025857610258600080fd5b610200848285016101dc565b6000806000806080858703121561027d5761027d600080fd5b60006102898787610208565b945050602061029a878288016101d1565b93505060406102ab878288016101d1565b925050606085013567ffffffffffffffff8111156102cb576102cb600080fd5b6102d7878288016101dc565b91505092959194509250565b6000602082840312156102f8576102f8600080fd5b6000610200848461021e565b6000806040838503121561031a5761031a600080fd5b60006103268585610213565b925050602061033785828601610213565b9150509250929050565b8015155b82525050565b603181526000602082017f5374617469634d696e74466565507265646963617465436c6f6e6561626c653a81527f206e6f7420696e697469616c697a65642e000000000000000000000000000000602082015291505b5060400190565b603581526000602082017f5374617469634d696e74466565507265646963617465436c6f6e6561626c653a81527f20616c726561647920696e697469616c697a65642e0000000000000000000000602082015291506103a1565b80610345565b602081016101038284610341565b602080825281016101038161034b565b60208082528101610103816103a8565b602081016101038284610402565b600061044f60405190565b905061045b82826104de565b919050565b600067ffffffffffffffff82111561047a5761047a610529565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011660200192915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610103565b6000610103826104a9565b82818337506000910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561052257610522610529565b6040525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610561816104a9565b811461056c57600080fd5b50565b610561816104c7565b8061056156fea26469706673582212206adbbf46a62b1d5b4c0a617479b794e22fb3ac9df212634f4ded6a2388b94e3064736f6c63430008060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.