Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 33,608 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint With Signat... | 63157404 | 187 days ago | IN | 0 POL | 0.0007359 | ||||
Mint With Signat... | 63157404 | 187 days ago | IN | 0 POL | 0.0007353 | ||||
Mint With Signat... | 63147707 | 187 days ago | IN | 0 POL | 0.00073941 | ||||
Mint With Signat... | 60970445 | 242 days ago | IN | 0 POL | 0.0009524 | ||||
Mint With Signat... | 60970445 | 242 days ago | IN | 0 POL | 0.00094587 | ||||
Mint With Signat... | 60970445 | 242 days ago | IN | 0 POL | 0.00093072 | ||||
Mint With Signat... | 60970445 | 242 days ago | IN | 0 POL | 0.00078583 | ||||
Mint With Signat... | 60970445 | 242 days ago | IN | 0 POL | 0.00078519 | ||||
Mint With Signat... | 60970444 | 242 days ago | IN | 0 POL | 0.00094227 | ||||
Mint With Signat... | 60970444 | 242 days ago | IN | 0 POL | 0.00093997 | ||||
Mint With Signat... | 60970444 | 242 days ago | IN | 0 POL | 0.00093092 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00095556 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00095478 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00096786 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00096658 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00096697 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00094257 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00093894 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00093971 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00094498 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00093596 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00110661 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00112376 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00113749 | ||||
Mint With Signat... | 60970442 | 242 days ago | IN | 0 POL | 0.00106324 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Diamond
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat import {LibDiamond} from "contracts/diamond/libraries/LibDiamond.sol"; import {LibEnvironmentConfig} from "contracts/libraries/LibEnvironmentConfig.sol"; import {IDiamondCut} from "contracts/diamond/interfaces/IDiamondCut.sol"; contract Diamond { constructor(address _contractOwner, address _diamondCutFacet) payable { LibDiamond.setContractOwner(_contractOwner); // Testnet configurations can be called from DebugFacet LibEnvironmentConfig.configureForPolygonMainnet(); // Add the diamondCut external function from the diamondCutFacet IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1); bytes4[] memory functionSelectors = new bytes4[](1); functionSelectors[0] = IDiamondCut.diamondCut.selector; cut[0] = IDiamondCut.FacetCut({ facetAddress: _diamondCutFacet, action: IDiamondCut.FacetCutAction.Add, functionSelectors: functionSelectors }); LibDiamond.diamondCut(cut, address(0), ""); } // Find facet for function that is called and execute the // function if a facet is found and return any value. fallback() external payable { /* solhint-disable no-inline-assembly */ LibDiamond.DiamondStorage storage ds; bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION; // get diamond storage assembly { ds.slot := position } // get facet from function selector address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress; require(facet != address(0), "Diamond: Function does not exist"); // Execute external function from facet using delegatecall and return any value. assembly { // copy function selector and any arguments calldatacopy(0, 0, calldatasize()) // execute function call using the facet let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0) // get any return value returndatacopy(0, 0, returndatasize()) // return any return value or error back to the caller switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } /* solhint-enable no-inline-assembly */ } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat import { IDiamondCut } from "contracts/diamond/interfaces/IDiamondCut.sol"; import { LibEvents } from "contracts/libraries/LibEvents.sol"; library LibDiamond { bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); struct FacetAddressAndPosition { address facetAddress; uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array } struct FacetFunctionSelectors { bytes4[] functionSelectors; uint256 facetAddressPosition; // position of facetAddress in facetAddresses array } struct DiamondStorage { // maps function selector to the facet address and // the position of the selector in the facetFunctionSelectors.selectors array mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition; // maps facet addresses to function selectors mapping(address => FacetFunctionSelectors) facetFunctionSelectors; // facet addresses address[] facetAddresses; // Used to query if a contract implements an interface. // Used to implement ERC-165. mapping(bytes4 => bool) supportedInterfaces; // owner of the contract address contractOwner; } function diamondStorage() internal pure returns (DiamondStorage storage ds) { bytes32 position = DIAMOND_STORAGE_POSITION; assembly { ds.slot := position } } function setContractOwner(address _newOwner) internal { DiamondStorage storage ds = diamondStorage(); address previousOwner = ds.contractOwner; ds.contractOwner = _newOwner; emit LibEvents.OwnershipTransferred(previousOwner, _newOwner); } function contractOwner() internal view returns (address contractOwner_) { contractOwner_ = diamondStorage().contractOwner; } function enforceIsContractOwner() internal view { require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner"); } // Internal function version of diamondCut function diamondCut( IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata ) internal { for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action; if (action == IDiamondCut.FacetCutAction.Add) { addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else if (action == IDiamondCut.FacetCutAction.Replace) { replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else if (action == IDiamondCut.FacetCutAction.Remove) { removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); } else { revert("LibDiamondCut: Incorrect FacetCutAction"); } } emit LibEvents.DiamondCut(_diamondCut, _init, _calldata); initializeDiamondCut(_init, _calldata); } function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); // add new facet address if it does not exist if (selectorPosition == 0) { addFacet(ds, _facetAddress); } for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists"); addFunction(ds, selector, selectorPosition, _facetAddress); selectorPosition++; } } function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); // add new facet address if it does not exist if (selectorPosition == 0) { addFacet(ds, _facetAddress); } for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function"); removeFunction(ds, oldFacetAddress, selector); addFunction(ds, selector, selectorPosition, _facetAddress); selectorPosition++; } } function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); DiamondStorage storage ds = diamondStorage(); // if function does not exist then do nothing and return require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { bytes4 selector = _functionSelectors[selectorIndex]; address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; removeFunction(ds, oldFacetAddress, selector); } } function addFacet(DiamondStorage storage ds, address _facetAddress) internal { enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code"); ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length; ds.facetAddresses.push(_facetAddress); } function addFunction(DiamondStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _facetAddress) internal { ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition; ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector); ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress; } function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal { require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); // an immutable function is a function defined directly in a diamond require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function"); // replace selector with last selector, then delete last selector uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition; uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1; // if not the same then replace _selector with lastSelector if (selectorPosition != lastSelectorPosition) { bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition]; ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector; ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition); } // delete the last selector ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop(); delete ds.selectorToFacetAndPosition[_selector]; // if no more selectors for facet address then delete the facet address if (lastSelectorPosition == 0) { // replace facet address with last facet address and delete last facet address uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1; uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; if (facetAddressPosition != lastFacetAddressPosition) { address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition]; ds.facetAddresses[facetAddressPosition] = lastFacetAddress; ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition; } ds.facetAddresses.pop(); delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; } } function initializeDiamondCut(address _init, bytes memory _calldata) internal { if (_init == address(0)) { require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty"); } else { require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)"); if (_init != address(this)) { enforceHasContractCode(_init, "LibDiamondCut: _init address has no code"); } (bool success, bytes memory error) = _init.delegatecall(_calldata); if (!success) { if (error.length > 0) { // bubble up the error revert(string(error)); } else { revert("LibDiamondCut: _init function reverted"); } } } } function enforceHasContractCode(address _contract, string memory _errorMessage) internal view { uint256 contractSize; assembly { contractSize := extcodesize(_contract) } require(contractSize > 0, _errorMessage); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat interface IDiamondCut { enum FacetCutAction { Add, Replace, Remove } // Add=0, Replace=1, Remove=2 struct FacetCut { address facetAddress; FacetCutAction action; bytes4[] functionSelectors; } /// @notice Add/replace/remove any number of functions and optionally execute /// a function with delegatecall /// @param _diamondCut Contains the facet addresses and function selectors /// @param _init The address of the contract or facet to execute _calldata /// @param _calldata A function call, including function selector and arguments /// _calldata is executed with delegatecall on _init function diamondCut( FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata ) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; import { IDiamondCut } from "contracts/diamond/interfaces/IDiamondCut.sol"; library LibEvents { event Example(string indexed example); event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AdminSetUnicornAddress(address msgSender, address oldAddress, address newAddress); event GemCreated( uint256 indexed requestId, uint256 indexed tokenId, address owner, string name, address indexed signer, uint256[] parameters ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {LibDiamond} from "contracts/diamond/libraries/LibDiamond.sol"; import "contracts/utils/introspection/IERC165.sol"; import {IERC173} from "contracts/diamond/interfaces/IERC173.sol"; import {IDiamondCut} from "contracts/diamond/interfaces/IDiamondCut.sol"; import {IDiamondLoupe} from "contracts/diamond/interfaces/IDiamondLoupe.sol"; import {IERC721} from "contracts/interfaces/IERC721.sol"; import { ISolidStateERC721 } from "contracts/token/ERC721/ISolidStateERC721.sol"; import { IERC721Enumerable } from "contracts/token/ERC721/enumerable/IERC721Enumerable.sol"; import { IERC721Metadata } from "contracts/token/ERC721/metadata/IERC721Metadata.sol"; library LibEnvironmentConfig { uint256 private constant POLYGON_CHAINID = 137; function initializeSupportedInterface() internal { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); ds.supportedInterfaces[type(IERC721).interfaceId] = true; // 0x80ac58cd ds.supportedInterfaces[type(IERC721Metadata).interfaceId] = true; // 0x5b5e139f ds.supportedInterfaces[type(IERC165).interfaceId] = true; // 0x01ffc9a7 ds.supportedInterfaces[type(IERC721Enumerable).interfaceId] = true; // 0x780e9d63 ds.supportedInterfaces[type(ISolidStateERC721).interfaceId] = true; ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true; ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true; ds.supportedInterfaces[type(IERC173).interfaceId] = true; } function configureForPolygonMainnet() internal { initializeSupportedInterface(); } function configureForMumbaiTestnet() internal { require(block.chainid != POLYGON_CHAINID, "This configuration cannot be loaded on mainnet!"); initializeSupportedInterface(); } // MISSING THIS PARAMS // address gameBank, address unim, address rbw, address terminus, address vrfCoordinator, address link // TODO: Delete initalizers and pass this parameters here. function configureForLocalhost() internal { require(block.chainid != POLYGON_CHAINID, "This configuration cannot be loaded on mainnet!"); configureForMumbaiTestnet(); // for now, copy testnet } }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /// @title ERC-173 Contract Ownership Standard /// Note: the ERC-165 identifier for this interface is 0x7f5828d0 /* is ERC165 */ interface IERC173 { /// @dev This emits when ownership of a contract changes. event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /// @notice Get the address of the owner /// @return owner_ The address of the owner. function owner() external view returns (address owner_); /// @notice Set the address of the new owner of the contract /// @dev Set _newOwner to address(0) to renounce any ownership. /// @param _newOwner The address of the new owner of the contract function transferOwnership(address _newOwner) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat // A loupe is a small magnifying glass used to look at diamonds. // These functions look at diamonds interface IDiamondLoupe { /// These functions are expected to be called frequently /// by tools. struct Facet { address facetAddress; bytes4[] functionSelectors; } /// @notice Gets all facet addresses and their four byte function selectors. /// @return facets_ Facet function facets() external view returns (Facet[] memory facets_); /// @notice Gets all the function selectors supported by a specific facet. /// @param _facet The facet address. /// @return facetFunctionSelectors_ function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_); /// @notice Get all the facet addresses used by a diamond. /// @return facetAddresses_ function facetAddresses() external view returns (address[] memory facetAddresses_); /// @notice Gets the facet that supports the given selector. /// @dev If facet is not found return address(0). /// @param _functionSelector The function selector. /// @return facetAddress_ The facet address. function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC165 } from "contracts/interfaces/IERC165.sol"; import { IERC721Internal } from "contracts/interfaces/IERC721Internal.sol"; /** * @title ERC721 interface * @dev see https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721 is IERC721Internal, IERC165 { /** * @notice query the balance of given address * @return balance quantity of tokens held */ function balanceOf(address account) external view returns (uint256 balance); /** * @notice query the owner of given token * @param tokenId token to query * @return owner token owner */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @notice transfer token between given addresses, checking for ERC721Receiver implementation if applicable * @param from sender of token * @param to receiver of token * @param tokenId token id */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @notice transfer token between given addresses, checking for ERC721Receiver implementation if applicable * @param from sender of token * @param to receiver of token * @param tokenId token id * @param data data payload */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @notice transfer token between given addresses, without checking for ERC721Receiver implementation if applicable * @param from sender of token * @param to receiver of token * @param tokenId token id */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @notice grant approval to given account to spend token * @param operator address to be approved * @param tokenId token to approve */ function approve(address operator, uint256 tokenId) external payable; /** * @notice get approval status for given token * @param tokenId token to query * @return operator address approved to spend token */ function getApproved( uint256 tokenId ) external view returns (address operator); /** * @notice grant approval to or revoke approval from given account to spend all tokens held by sender * @param operator address to be approved * @param status approval status */ function setApprovalForAll(address operator, bool status) external; /** * @notice query approval status of given operator with respect to given address * @param account address to query for approval granted * @param operator address to query for approval received * @return status whether operator is approved to spend tokens held by account */ function isApprovedForAll( address account, address operator ) external view returns (bool status); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC165Internal } from "contracts/interfaces/IERC165Internal.sol"; /** * @title ERC165 interface registration interface * @dev see https://eips.ethereum.org/EIPS/eip-165 */ interface IERC165 is IERC165Internal { /** * @notice query whether contract has registered support for given interface * @param interfaceId interface id * @return bool whether interface is supported */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title ERC165 interface registration interface */ interface IERC165Internal { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title Partial ERC721 interface needed by internal functions */ interface IERC721Internal { event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event Approval( address indexed owner, address indexed operator, uint256 indexed tokenId ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC721Base } from "contracts/token/ERC721/base/IERC721Base.sol"; import { IERC721Enumerable } from "contracts/token/ERC721/enumerable/IERC721Enumerable.sol"; import { IERC721Metadata } from "contracts/token/ERC721/metadata/IERC721Metadata.sol"; interface ISolidStateERC721 is IERC721Base, IERC721Enumerable, IERC721Metadata { error SolidStateERC721__PayableApproveNotSupported(); error SolidStateERC721__PayableTransferNotSupported(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC721 } from "contracts/interfaces/IERC721.sol"; import { IERC721BaseInternal } from "contracts/token/ERC721/base/IERC721BaseInternal.sol"; /** * @title ERC721 base interface */ interface IERC721Base is IERC721BaseInternal, IERC721 { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC721Internal } from "contracts/interfaces/IERC721Internal.sol"; /** * @title ERC721 base interface */ interface IERC721BaseInternal is IERC721Internal { error ERC721Base__NotOwnerOrApproved(); error ERC721Base__SelfApproval(); error ERC721Base__BalanceQueryZeroAddress(); error ERC721Base__ERC721ReceiverNotImplemented(); error ERC721Base__InvalidOwner(); error ERC721Base__MintToZeroAddress(); error ERC721Base__NonExistentToken(); error ERC721Base__NotTokenOwner(); error ERC721Base__TokenAlreadyMinted(); error ERC721Base__TransferToZeroAddress(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; interface IERC721Enumerable { /** * @notice get total token supply * @return total supply */ function totalSupply() external view returns (uint256); /** * @notice get token of given owner at given internal storage index * @param owner token holder to query * @param index position in owner's token list to query * @return tokenId id of retrieved token */ function tokenOfOwnerByIndex( address owner, uint256 index ) external view returns (uint256 tokenId); /** * @notice get token at given internal storage index * @param index position in global token list to query * @return tokenId id of retrieved token */ function tokenByIndex( uint256 index ) external view returns (uint256 tokenId); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC721MetadataInternal } from "contracts/token/ERC721/metadata/IERC721MetadataInternal.sol"; /** * @title ERC721Metadata interface */ interface IERC721Metadata is IERC721MetadataInternal { /** * @notice get token name * @return token name */ function name() external view returns (string memory); /** * @notice get token symbol * @return token symbol */ function symbol() external view returns (string memory); /** * @notice get generated URI for given token * @return token URI */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC721BaseInternal } from "contracts/token/ERC721/base/IERC721BaseInternal.sol"; /** * @title ERC721Metadata internal interface */ interface IERC721MetadataInternal is IERC721BaseInternal { error ERC721Metadata__NonExistentToken(); }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "Diamond.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_contractOwner","type":"address"},{"internalType":"address","name":"_diamondCutFacet","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","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"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260405161165c38038061165c83398101604081905261002291611237565b61002b8261013e565b6100336101c1565b604080516001808252818301909252600091816020015b6040805160608082018352600080835260208301529181019190915281526020019060019003908161004a5750506040805160018082528183019092529192506000919060208083019080368337019050509050631f931c1c60e01b816000815181106100b9576100b961126a565b6001600160e01b031990921660209283029190910182015260408051606081019091526001600160a01b03851681529081016000815260200182815250826000815181106101095761010961126a565b60200260200101819052506101358260006040518060200160405280600081525061034860201b60201c565b505050506114a8565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132080546001600160a01b031981166001600160a01b038481169182179093556040516000805160206115b0833981519152939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6103467fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f6020527fb0f299ecb5b93181be17d5e233721498930c5361f367b1d41c5b827d4fe4d3808054600160ff1991821681179092557f806e5513950c43892aa01780f899fe3e3229f9425b66a2610b01231f5799f44e80548216831790557f699d9daa71b280d05a152715774afa0a81a312594b2d731d6b0b2552b7d6f69f80548216831790557fc564b00dd622489e8872cfaa1fdbe51ee7adef071bfa99bc1effdc20162fa70a80548216831790557f13276fc84fe2ffd2402aa57e5fa8b9299b17e514e3d92e3de77205c4204f5f6f80548216831790557ff97e938d8af42f52387bb74b8b526fda8f184cc2aa534340a8d75a88fbecc77580548216831790557f65d510a5d8f7ef134ec444f7f34ee808c8eeb5177cdfd16be0c40fe1ab43369580548216831790556307f5828d60e41b6000527f5622121b47b8cd0120c4efe45dd5483242f54a3d49bd7679be565d47694918c380549091169091179055565b565b60005b83518110156105255760008482815181106103685761036861126a565b60200260200101516020015190506000600281111561038957610389611280565b81600281111561039b5761039b611280565b036103ef576103ea8583815181106103b5576103b561126a565b6020026020010151600001518684815181106103d3576103d361126a565b60200260200101516040015161057060201b60201c565b610512565b600181600281111561040357610403611280565b03610452576103ea85838151811061041d5761041d61126a565b60200260200101516000015186848151811061043b5761043b61126a565b6020026020010151604001516107e860201b60201c565b600281600281111561046657610466611280565b036104b5576103ea8583815181106104805761048061126a565b60200260200101516000015186848151811061049e5761049e61126a565b602002602001015160400151610a6960201b60201c565b60405162461bcd60e51b815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f727265637420466163657443756044820152663a20b1ba34b7b760c91b60648201526084015b60405180910390fd5b508061051d816112ac565b91505061034b565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055993929190611315565b60405180910390a161056b8282610bc0565b505050565b60008151116105c35760405162461bcd60e51b815260206004820152602b602482015260008051602061163c83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401610509565b6000805160206115b08339815191526001600160a01b03831661062b5760405162461bcd60e51b815260206004820152602c60248201526000805160206115f883398151915260448201526b65206164647265737328302960a01b6064820152608401610509565b6001600160a01b0383166000908152600182016020526040812054906001600160601b0382169003610661576106618285610dcd565b60005b83518110156107e15760008482815181106106815761068161126a565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156107275760405162461bcd60e51b815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152608401610509565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b031916179055836107c981611415565b945050505080806107d9906112ac565b915050610664565b5050505050565b600081511161083b5760405162461bcd60e51b815260206004820152602b602482015260008051602061163c83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401610509565b6000805160206115b08339815191526001600160a01b0383166108a35760405162461bcd60e51b815260206004820152602c60248201526000805160206115f883398151915260448201526b65206164647265737328302960a01b6064820152608401610509565b6001600160a01b0383166000908152600182016020526040812054906001600160601b03821690036108d9576108d98285610dcd565b60005b83518110156107e15760008482815181106108f9576108f961126a565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b0390811690871681036109a45760405162461bcd60e51b815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152608401610509565b6109af858284610e37565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b03191617905583610a5181611415565b94505050508080610a61906112ac565b9150506108dc565b6000815111610abc5760405162461bcd60e51b815260206004820152602b602482015260008051602061163c83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401610509565b6000805160206115b08339815191526001600160a01b03831615610b485760405162461bcd60e51b815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152608401610509565b60005b8251811015610bba576000838281518110610b6857610b6861126a565b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b0316610ba5848284610e37565b50508080610bb2906112ac565b915050610b4b565b50505050565b6001600160a01b038216610c4757805115610c435760405162461bcd60e51b815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d707479000000006064820152608401610509565b5050565b6000815111610cbe5760405162461bcd60e51b815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f7420616464726573732830290000006064820152608401610509565b6001600160a01b0382163014610cf057610cf0826040518060600160405280602881526020016115d0602891396111fa565b600080836001600160a01b031683604051610d0b9190611443565b600060405180830381855af49150503d8060008114610d46576040519150601f19603f3d011682016040523d82523d6000602084013e610d4b565b606091505b509150915081610bba57805115610d76578060405162461bcd60e51b8152600401610509919061145f565b60405162461bcd60e51b815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e2072656044820152651d995c9d195960d21b6064820152608401610509565b610def81604051806060016040528060248152602001611618602491396111fa565b6002820180546001600160a01b0390921660008181526001948501602090815260408220860185905594840183559182529290200180546001600160a01b0319169091179055565b6001600160a01b038216610eb35760405162461bcd60e51b815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152608401610509565b306001600160a01b03831603610f225760405162461bcd60e51b815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201526d3a30b1363290333ab731ba34b7b760911b6064820152608401610509565b6001600160e01b03198116600090815260208481526040808320546001600160a01b0386168452600180880190935290832054600160a01b9091046001600160601b03169291610f7191611479565b9050808214611063576001600160a01b03841660009081526001860160205260408120805483908110610fa657610fa661126a565b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b925082919085908110610ff757610ff761126a565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b03199290921682528690526040902080546001600160a01b0316600160a01b6001600160601b038516021790555b6001600160a01b0384166000908152600186016020526040902080548061108c5761108c611492565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b031985168252869052604081208190558190036107e15760028501546000906110ef90600190611479565b6001600160a01b038616600090815260018089016020526040909120015490915080821461119e57600087600201838154811061112e5761112e61126a565b6000918252602090912001546002890180546001600160a01b03909216925082918490811061115f5761115f61126a565b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055929091168152600189810190925260409020018190555b866002018054806111b1576111b1611492565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b8181610bba5760405162461bcd60e51b8152600401610509919061145f565b80516001600160a01b038116811461123257600080fd5b919050565b6000806040838503121561124a57600080fd5b6112538361121b565b91506112616020840161121b565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016112be576112be611296565b5060010190565b60005b838110156112e05781810151838201526020016112c8565b50506000910152565b600081518084526113018160208601602086016112c5565b601f01601f19169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156113e557898403607f19018652815180516001600160a01b0316855283810151898601906003811061138457634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b808310156113d05783516001600160e01b03191682529286019260019290920191908601906113a6565b5097850197955050509082019060010161133e565b50506001600160a01b038a1690880152868103604088015261140781896112e9565b9a9950505050505050505050565b60006001600160601b038281166002600160601b0319810161143957611439611296565b6001019392505050565b600082516114558184602087016112c5565b9190910192915050565b60208152600061147260208301846112e9565b9392505050565b8181038181111561148c5761148c611296565b92915050565b634e487b7160e01b600052603160045260246000fd5b60fa806114b66000396000f3fe608060405236600a57005b600080356001600160e01b03191681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c602081905260409091205481906001600160a01b03168060a15760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374604482015260640160405180910390fd5b3660008037600080366000845af43d6000803e80801560bf573d6000f35b3d6000fdfea26469706673582212203afe2c1ff8eda4454423e6828fa86abd450a2a45efe33d1eb4821efa872b2ac264736f6c63430008140033c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204164642066616365742063616e277420624c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f64654c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e2066000000000000000000000000453d39960a9fd2c652987f64e00feba43f34839300000000000000000000000076fa0d98981d305bfc98cbb3ad6020897007665d
Deployed Bytecode
0x608060405236600a57005b600080356001600160e01b03191681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c602081905260409091205481906001600160a01b03168060a15760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374604482015260640160405180910390fd5b3660008037600080366000845af43d6000803e80801560bf573d6000f35b3d6000fdfea26469706673582212203afe2c1ff8eda4454423e6828fa86abd450a2a45efe33d1eb4821efa872b2ac264736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000453d39960a9fd2c652987f64e00feba43f34839300000000000000000000000076fa0d98981d305bfc98cbb3ad6020897007665d
-----Decoded View---------------
Arg [0] : _contractOwner (address): 0x453D39960a9FD2C652987F64e00fEBa43F348393
Arg [1] : _diamondCutFacet (address): 0x76fa0d98981D305Bfc98cBB3ad6020897007665d
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000453d39960a9fd2c652987f64e00feba43f348393
Arg [1] : 00000000000000000000000076fa0d98981d305bfc98cbb3ad6020897007665d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Loading...
Loading
Loading...
Loading
[ 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.