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:
LandProxyInitializer
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@solidstate/contracts/access/ownable/OwnableInternal.sol"; import "@solidstate/contracts/introspection/ERC165Storage.sol"; import "@solidstate/contracts/proxy/diamond/SolidStateDiamond.sol"; import "@solidstate/contracts/token/ERC1155/IERC1155.sol"; import "@solidstate/contracts/token/ERC1155/metadata/IERC1155Metadata.sol"; import "@solidstate/contracts/token/ERC1155/metadata/ERC1155MetadataStorage.sol"; import "../vendor/ERC2981/IERC2981Royalties.sol"; import "../vendor/ERC2981/ERC2981Storage.sol"; import "../vendor/OpenSea/OpenSeaCompatible.sol"; import "../vendor/OpenSea/OpenSeaProxyStorage.sol"; import "./LandStorage.sol"; import "./LandTypes.sol"; contract LandProxy is SolidStateDiamond { using ERC165Storage for ERC165Storage.Layout; constructor() { ERC165Storage.layout().setSupportedInterface(type(IERC1155).interfaceId, true); ERC165Storage.layout().setSupportedInterface(type(IERC1155Metadata).interfaceId, true); ERC165Storage.layout().setSupportedInterface(type(IERC2981Royalties).interfaceId, true); } } contract LandProxyInitializer { function init( LandInitArgs memory landInit, RoyaltyInfo memory royaltyInit, OpenSeaProxyInitArgs memory osInit, string memory contractURI, string memory baseURI ) external { // Init ERC1155Metadata ERC1155MetadataStorage.layout().baseURI = baseURI; OpenSeaCompatibleStorage.layout().contractURI = contractURI; // Init Land LandStorage.layout().mintState = uint8(MintState.CLOSED); LandStorage.layout().price = 0.2 ether; LandStorage.layout().signer = landInit.signer; LandStorage.layout().avatars = landInit.avatars; LandStorage.layout().avatarClaim = landInit.avatarClaim; // loop thru the zones for sale for (uint8 i = 0; i < landInit.zones.length; i++) { LandStorage._addZone(landInit.zones[i]); } // Init Royalties ERC2981Storage.layout().royalties = royaltyInit; // Init Opensea Proxy OpenSeaProxyStorage._setProxies(osInit); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC173Internal } from './IERC173Internal.sol'; /** * @title Contract ownership standard interface * @dev see https://eips.ethereum.org/EIPS/eip-173 */ interface IERC173 is IERC173Internal { /** * @notice get the ERC173 contract owner * @return conrtact owner */ function owner() external view returns (address); /** * @notice transfer contract ownership to new account * @param account address of new owner */ function transferOwnership(address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Partial ERC173 interface needed by internal functions */ interface IERC173Internal { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC173 } from '../IERC173.sol'; interface IOwnable is IERC173 {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC173Internal } from '../IERC173Internal.sol'; interface IOwnableInternal is IERC173Internal {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IOwnable } from './IOwnable.sol'; interface ISafeOwnable is IOwnable { /** * @notice get the nominated owner who has permission to call acceptOwnership */ function nomineeOwner() external view returns (address); /** * @notice accept transfer of contract ownership */ function acceptOwnership() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IOwnableInternal } from './IOwnableInternal.sol'; interface ISafeOwnableInternal is IOwnableInternal {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC173 } from '../IERC173.sol'; import { IOwnable } from './IOwnable.sol'; import { OwnableInternal } from './OwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; /** * @title Ownership access control based on ERC173 */ abstract contract Ownable is IOwnable, OwnableInternal { using OwnableStorage for OwnableStorage.Layout; /** * @inheritdoc IERC173 */ function owner() public view virtual returns (address) { return _owner(); } /** * @inheritdoc IERC173 */ function transferOwnership(address account) public virtual onlyOwner { _transferOwnership(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IOwnableInternal } from './IOwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; abstract contract OwnableInternal is IOwnableInternal { using OwnableStorage for OwnableStorage.Layout; modifier onlyOwner() { require( msg.sender == OwnableStorage.layout().owner, 'Ownable: sender must be owner' ); _; } function _owner() internal view virtual returns (address) { return OwnableStorage.layout().owner; } function _transferOwnership(address account) internal virtual { OwnableStorage.layout().setOwner(account); emit OwnershipTransferred(msg.sender, account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library OwnableStorage { struct Layout { address owner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.Ownable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setOwner(Layout storage l, address owner) internal { l.owner = owner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Ownable, OwnableStorage } from './Ownable.sol'; import { ISafeOwnable } from './ISafeOwnable.sol'; import { OwnableInternal } from './OwnableInternal.sol'; import { SafeOwnableInternal } from './SafeOwnableInternal.sol'; /** * @title Ownership access control based on ERC173 with ownership transfer safety check */ abstract contract SafeOwnable is ISafeOwnable, Ownable, SafeOwnableInternal { /** * @inheritdoc ISafeOwnable */ function nomineeOwner() public view virtual returns (address) { return _nomineeOwner(); } /** * @inheritdoc ISafeOwnable */ function acceptOwnership() public virtual onlyNomineeOwner { _acceptOwnership(); } function _transferOwnership(address account) internal virtual override(OwnableInternal, SafeOwnableInternal) { super._transferOwnership(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISafeOwnableInternal } from './ISafeOwnableInternal.sol'; import { OwnableInternal } from './OwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; import { SafeOwnableStorage } from './SafeOwnableStorage.sol'; abstract contract SafeOwnableInternal is ISafeOwnableInternal, OwnableInternal { using OwnableStorage for OwnableStorage.Layout; using SafeOwnableStorage for SafeOwnableStorage.Layout; modifier onlyNomineeOwner() { require( msg.sender == _nomineeOwner(), 'SafeOwnable: sender must be nominee owner' ); _; } /** * @notice get the nominated owner who has permission to call acceptOwnership */ function _nomineeOwner() internal view virtual returns (address) { return SafeOwnableStorage.layout().nomineeOwner; } /** * @notice accept transfer of contract ownership */ function _acceptOwnership() internal virtual { OwnableStorage.Layout storage l = OwnableStorage.layout(); emit OwnershipTransferred(l.owner, msg.sender); l.setOwner(msg.sender); SafeOwnableStorage.layout().setNomineeOwner(address(0)); } /** * @notice set nominee owner, granting permission to call acceptOwnership */ function _transferOwnership(address account) internal virtual override { SafeOwnableStorage.layout().setNomineeOwner(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeOwnableStorage { struct Layout { address nomineeOwner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.SafeOwnable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setNomineeOwner(Layout storage l, address nomineeOwner) internal { l.nomineeOwner = nomineeOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC165 } from './IERC165.sol'; import { ERC165Storage } from './ERC165Storage.sol'; /** * @title ERC165 implementation */ abstract contract ERC165 is IERC165 { using ERC165Storage for ERC165Storage.Layout; /** * @inheritdoc IERC165 */ function supportsInterface(bytes4 interfaceId) public view returns (bool) { return ERC165Storage.layout().isSupportedInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC165Storage { struct Layout { mapping(bytes4 => bool) supportedInterfaces; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.ERC165'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function isSupportedInterface(Layout storage l, bytes4 interfaceId) internal view returns (bool) { return l.supportedInterfaces[interfaceId]; } function setSupportedInterface( Layout storage l, bytes4 interfaceId, bool status ) internal { require(interfaceId != 0xffffffff, 'ERC165: invalid interface id'); l.supportedInterfaces[interfaceId] = status; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC165 interface registration interface * @dev see https://eips.ethereum.org/EIPS/eip-165 */ interface IERC165 { /** * @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.0; interface IProxy { fallback() external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { AddressUtils } from '../utils/AddressUtils.sol'; import { IProxy } from './IProxy.sol'; /** * @title Base proxy contract */ abstract contract Proxy is IProxy { using AddressUtils for address; /** * @notice delegate all calls to implementation contract * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts * @dev memory location in use by assembly may be unsafe in other contexts */ fallback() external payable virtual { address implementation = _getImplementation(); require( implementation.isContract(), 'Proxy: implementation must be contract' ); assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @notice get logic implementation address * @return implementation address */ function _getImplementation() internal virtual returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISafeOwnable } from '../../access/ownable/ISafeOwnable.sol'; import { IERC165 } from '../../introspection/IERC165.sol'; import { IDiamondBase } from './base/IDiamondBase.sol'; import { IDiamondReadable } from './readable/IDiamondReadable.sol'; import { IDiamondWritable } from './writable/IDiamondWritable.sol'; interface ISolidStateDiamond is IDiamondBase, IDiamondReadable, IDiamondWritable, ISafeOwnable, IERC165 { receive() external payable; /** * @notice get the address of the fallback contract * @return fallback address */ function getFallbackAddress() external view returns (address); /** * @notice set the address of the fallback contract * @param fallbackAddress fallback address */ function setFallbackAddress(address fallbackAddress) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IOwnable, Ownable, OwnableInternal, OwnableStorage } from '../../access/ownable/Ownable.sol'; import { ISafeOwnable, SafeOwnable } from '../../access/ownable/SafeOwnable.sol'; import { IERC173 } from '../../access/IERC173.sol'; import { ERC165, IERC165, ERC165Storage } from '../../introspection/ERC165.sol'; import { DiamondBase, DiamondBaseStorage } from './base/DiamondBase.sol'; import { DiamondReadable, IDiamondReadable } from './readable/DiamondReadable.sol'; import { DiamondWritable, IDiamondWritable } from './writable/DiamondWritable.sol'; import { ISolidStateDiamond } from './ISolidStateDiamond.sol'; /** * @title SolidState "Diamond" proxy reference implementation */ abstract contract SolidStateDiamond is ISolidStateDiamond, DiamondBase, DiamondReadable, DiamondWritable, SafeOwnable, ERC165 { using DiamondBaseStorage for DiamondBaseStorage.Layout; using ERC165Storage for ERC165Storage.Layout; using OwnableStorage for OwnableStorage.Layout; constructor() { ERC165Storage.Layout storage erc165 = ERC165Storage.layout(); bytes4[] memory selectors = new bytes4[](12); // register DiamondWritable selectors[0] = IDiamondWritable.diamondCut.selector; erc165.setSupportedInterface(type(IDiamondWritable).interfaceId, true); // register DiamondReadable selectors[1] = IDiamondReadable.facets.selector; selectors[2] = IDiamondReadable.facetFunctionSelectors.selector; selectors[3] = IDiamondReadable.facetAddresses.selector; selectors[4] = IDiamondReadable.facetAddress.selector; erc165.setSupportedInterface(type(IDiamondReadable).interfaceId, true); // register ERC165 selectors[5] = IERC165.supportsInterface.selector; erc165.setSupportedInterface(type(IERC165).interfaceId, true); // register SafeOwnable selectors[6] = Ownable.owner.selector; selectors[7] = SafeOwnable.nomineeOwner.selector; selectors[8] = Ownable.transferOwnership.selector; selectors[9] = SafeOwnable.acceptOwnership.selector; erc165.setSupportedInterface(type(IERC173).interfaceId, true); // register Diamond selectors[10] = SolidStateDiamond.getFallbackAddress.selector; selectors[11] = SolidStateDiamond.setFallbackAddress.selector; // diamond cut FacetCut[] memory facetCuts = new FacetCut[](1); facetCuts[0] = FacetCut({ target: address(this), action: IDiamondWritable.FacetCutAction.ADD, selectors: selectors }); DiamondBaseStorage.layout().diamondCut(facetCuts, address(0), ''); // set owner OwnableStorage.layout().setOwner(msg.sender); } receive() external payable {} /** * @inheritdoc ISolidStateDiamond */ function getFallbackAddress() external view returns (address) { return DiamondBaseStorage.layout().fallbackAddress; } /** * @inheritdoc ISolidStateDiamond */ function setFallbackAddress(address fallbackAddress) external onlyOwner { DiamondBaseStorage.layout().fallbackAddress = fallbackAddress; } function _transferOwnership(address account) internal virtual override(OwnableInternal, SafeOwnable) { super._transferOwnership(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Proxy } from '../../Proxy.sol'; import { IDiamondBase } from './IDiamondBase.sol'; import { DiamondBaseStorage } from './DiamondBaseStorage.sol'; /** * @title EIP-2535 "Diamond" proxy base contract * @dev see https://eips.ethereum.org/EIPS/eip-2535 */ abstract contract DiamondBase is IDiamondBase, Proxy { /** * @inheritdoc Proxy */ function _getImplementation() internal view override returns (address) { // inline storage layout retrieval uses less gas DiamondBaseStorage.Layout storage l; bytes32 slot = DiamondBaseStorage.STORAGE_SLOT; assembly { l.slot := slot } address implementation = address(bytes20(l.facets[msg.sig])); if (implementation == address(0)) { implementation = l.fallbackAddress; require( implementation != address(0), 'DiamondBase: no facet found for function signature' ); } return implementation; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { AddressUtils } from '../../../utils/AddressUtils.sol'; import { IDiamondWritable } from '../writable/IDiamondWritable.sol'; /** * @dev derived from https://github.com/mudgen/diamond-2 (MIT license) */ library DiamondBaseStorage { using AddressUtils for address; using DiamondBaseStorage for DiamondBaseStorage.Layout; struct Layout { // function selector => (facet address, selector slot position) mapping(bytes4 => bytes32) facets; // total number of selectors registered uint16 selectorCount; // array of selector slots with 8 selectors per slot mapping(uint256 => bytes32) selectorSlots; address fallbackAddress; } bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff)); bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224)); bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.DiamondBase'); event DiamondCut( IDiamondWritable.FacetCut[] facetCuts, address target, bytes data ); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } /** * @notice update functions callable on Diamond proxy * @param l storage layout * @param facetCuts array of structured Diamond facet update data * @param target optional recipient of initialization delegatecall * @param data optional initialization call data */ function diamondCut( Layout storage l, IDiamondWritable.FacetCut[] memory facetCuts, address target, bytes memory data ) internal { unchecked { uint256 originalSelectorCount = l.selectorCount; uint256 selectorCount = originalSelectorCount; bytes32 selectorSlot; // Check if last selector slot is not full if (selectorCount & 7 > 0) { // get last selectorSlot selectorSlot = l.selectorSlots[selectorCount >> 3]; } for (uint256 i; i < facetCuts.length; i++) { IDiamondWritable.FacetCut memory facetCut = facetCuts[i]; IDiamondWritable.FacetCutAction action = facetCut.action; require( facetCut.selectors.length > 0, 'DiamondBase: no selectors specified' ); if (action == IDiamondWritable.FacetCutAction.ADD) { (selectorCount, selectorSlot) = l.addFacetSelectors( selectorCount, selectorSlot, facetCut ); } else if (action == IDiamondWritable.FacetCutAction.REPLACE) { l.replaceFacetSelectors(facetCut); } else if (action == IDiamondWritable.FacetCutAction.REMOVE) { (selectorCount, selectorSlot) = l.removeFacetSelectors( selectorCount, selectorSlot, facetCut ); } } if (selectorCount != originalSelectorCount) { l.selectorCount = uint16(selectorCount); } // If last selector slot is not full if (selectorCount & 7 > 0) { l.selectorSlots[selectorCount >> 3] = selectorSlot; } emit DiamondCut(facetCuts, target, data); initialize(target, data); } } function addFacetSelectors( Layout storage l, uint256 selectorCount, bytes32 selectorSlot, IDiamondWritable.FacetCut memory facetCut ) internal returns (uint256, bytes32) { unchecked { require( facetCut.target == address(this) || facetCut.target.isContract(), 'DiamondBase: ADD target has no code' ); for (uint256 i; i < facetCut.selectors.length; i++) { bytes4 selector = facetCut.selectors[i]; bytes32 oldFacet = l.facets[selector]; require( address(bytes20(oldFacet)) == address(0), 'DiamondBase: selector already added' ); // add facet for selector l.facets[selector] = bytes20(facetCut.target) | bytes32(selectorCount); uint256 selectorInSlotPosition = (selectorCount & 7) << 5; // clear selector position in slot and add selector selectorSlot = (selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition); // if slot is full then write it to storage if (selectorInSlotPosition == 224) { l.selectorSlots[selectorCount >> 3] = selectorSlot; selectorSlot = 0; } selectorCount++; } return (selectorCount, selectorSlot); } } function removeFacetSelectors( Layout storage l, uint256 selectorCount, bytes32 selectorSlot, IDiamondWritable.FacetCut memory facetCut ) internal returns (uint256, bytes32) { unchecked { require( facetCut.target == address(0), 'DiamondBase: REMOVE target must be zero address' ); uint256 selectorSlotCount = selectorCount >> 3; uint256 selectorInSlotIndex = selectorCount & 7; for (uint256 i; i < facetCut.selectors.length; i++) { bytes4 selector = facetCut.selectors[i]; bytes32 oldFacet = l.facets[selector]; require( address(bytes20(oldFacet)) != address(0), 'DiamondBase: selector not found' ); require( address(bytes20(oldFacet)) != address(this), 'DiamondBase: selector is immutable' ); if (selectorSlot == 0) { selectorSlotCount--; selectorSlot = l.selectorSlots[selectorSlotCount]; selectorInSlotIndex = 7; } else { selectorInSlotIndex--; } bytes4 lastSelector; uint256 oldSelectorsSlotCount; uint256 oldSelectorInSlotPosition; // adding a block here prevents stack too deep error { // replace selector with last selector in l.facets lastSelector = bytes4( selectorSlot << (selectorInSlotIndex << 5) ); if (lastSelector != selector) { // update last selector slot position info l.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(l.facets[lastSelector]); } delete l.facets[selector]; uint256 oldSelectorCount = uint16(uint256(oldFacet)); oldSelectorsSlotCount = oldSelectorCount >> 3; oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5; } if (oldSelectorsSlotCount != selectorSlotCount) { bytes32 oldSelectorSlot = l.selectorSlots[ oldSelectorsSlotCount ]; // clears the selector we are deleting and puts the last selector in its place. oldSelectorSlot = (oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); // update storage with the modified slot l.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot; } else { // clears the selector we are deleting and puts the last selector in its place. selectorSlot = (selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); } if (selectorInSlotIndex == 0) { delete l.selectorSlots[selectorSlotCount]; selectorSlot = 0; } } selectorCount = (selectorSlotCount << 3) | selectorInSlotIndex; return (selectorCount, selectorSlot); } } function replaceFacetSelectors( Layout storage l, IDiamondWritable.FacetCut memory facetCut ) internal { unchecked { require( facetCut.target.isContract(), 'DiamondBase: REPLACE target has no code' ); for (uint256 i; i < facetCut.selectors.length; i++) { bytes4 selector = facetCut.selectors[i]; bytes32 oldFacet = l.facets[selector]; address oldFacetAddress = address(bytes20(oldFacet)); require( oldFacetAddress != address(0), 'DiamondBase: selector not found' ); require( oldFacetAddress != address(this), 'DiamondBase: selector is immutable' ); require( oldFacetAddress != facetCut.target, 'DiamondBase: REPLACE target is identical' ); // replace old facet address l.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(facetCut.target); } } } function initialize(address target, bytes memory data) private { require( (target == address(0)) == (data.length == 0), 'DiamondBase: invalid initialization parameters' ); if (target != address(0)) { if (target != address(this)) { require( target.isContract(), 'DiamondBase: initialization target has no code' ); } (bool success, ) = target.delegatecall(data); if (!success) { assembly { returndatacopy(0, 0, returndatasize()) revert(0, returndatasize()) } } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IProxy } from '../../IProxy.sol'; interface IDiamondBase is IProxy {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol'; import { IDiamondReadable } from './IDiamondReadable.sol'; /** * @title EIP-2535 "Diamond" proxy introspection contract * @dev derived from https://github.com/mudgen/diamond-2 (MIT license) */ abstract contract DiamondReadable is IDiamondReadable { /** * @inheritdoc IDiamondReadable */ function facets() external view returns (Facet[] memory diamondFacets) { DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout(); diamondFacets = new Facet[](l.selectorCount); uint8[] memory numFacetSelectors = new uint8[](l.selectorCount); uint256 numFacets; uint256 selectorIndex; // loop through function selectors for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) { bytes32 slot = l.selectorSlots[slotIndex]; for ( uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++ ) { selectorIndex++; if (selectorIndex > l.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); address facet = address(bytes20(l.facets[selector])); bool continueLoop; for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { if (diamondFacets[facetIndex].target == facet) { diamondFacets[facetIndex].selectors[ numFacetSelectors[facetIndex] ] = selector; // probably will never have more than 256 functions from one facet contract require(numFacetSelectors[facetIndex] < 255); numFacetSelectors[facetIndex]++; continueLoop = true; break; } } if (continueLoop) { continue; } diamondFacets[numFacets].target = facet; diamondFacets[numFacets].selectors = new bytes4[]( l.selectorCount ); diamondFacets[numFacets].selectors[0] = selector; numFacetSelectors[numFacets] = 1; numFacets++; } } for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { uint256 numSelectors = numFacetSelectors[facetIndex]; bytes4[] memory selectors = diamondFacets[facetIndex].selectors; // setting the number of selectors assembly { mstore(selectors, numSelectors) } } // setting the number of facets assembly { mstore(diamondFacets, numFacets) } } /** * @inheritdoc IDiamondReadable */ function facetFunctionSelectors(address facet) external view returns (bytes4[] memory selectors) { DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout(); selectors = new bytes4[](l.selectorCount); uint256 numSelectors; uint256 selectorIndex; // loop through function selectors for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) { bytes32 slot = l.selectorSlots[slotIndex]; for ( uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++ ) { selectorIndex++; if (selectorIndex > l.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); if (facet == address(bytes20(l.facets[selector]))) { selectors[numSelectors] = selector; numSelectors++; } } } // set the number of selectors in the array assembly { mstore(selectors, numSelectors) } } /** * @inheritdoc IDiamondReadable */ function facetAddresses() external view returns (address[] memory addresses) { DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout(); addresses = new address[](l.selectorCount); uint256 numFacets; uint256 selectorIndex; for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) { bytes32 slot = l.selectorSlots[slotIndex]; for ( uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++ ) { selectorIndex++; if (selectorIndex > l.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); address facet = address(bytes20(l.facets[selector])); bool continueLoop; for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { if (facet == addresses[facetIndex]) { continueLoop = true; break; } } if (continueLoop) { continue; } addresses[numFacets] = facet; numFacets++; } } // set the number of facet addresses in the array assembly { mstore(addresses, numFacets) } } /** * @inheritdoc IDiamondReadable */ function facetAddress(bytes4 selector) external view returns (address facet) { facet = address(bytes20(DiamondBaseStorage.layout().facets[selector])); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Diamond proxy introspection interface * @dev see https://eips.ethereum.org/EIPS/eip-2535 */ interface IDiamondReadable { struct Facet { address target; bytes4[] selectors; } /** * @notice get all facets and their selectors * @return diamondFacets array of structured facet data */ function facets() external view returns (Facet[] memory diamondFacets); /** * @notice get all selectors for given facet address * @param facet address of facet to query * @return selectors array of function selectors */ function facetFunctionSelectors(address facet) external view returns (bytes4[] memory selectors); /** * @notice get addresses of all facets used by diamond * @return addresses array of facet addresses */ function facetAddresses() external view returns (address[] memory addresses); /** * @notice get the address of the facet associated with given selector * @param selector function selector to query * @return facet facet address (zero address if not found) */ function facetAddress(bytes4 selector) external view returns (address facet); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { OwnableInternal } from '../../../access/ownable/OwnableInternal.sol'; import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol'; import { IDiamondWritable } from './IDiamondWritable.sol'; /** * @title EIP-2535 "Diamond" proxy update contract */ abstract contract DiamondWritable is IDiamondWritable, OwnableInternal { using DiamondBaseStorage for DiamondBaseStorage.Layout; /** * @inheritdoc IDiamondWritable */ function diamondCut( FacetCut[] calldata facetCuts, address target, bytes calldata data ) external onlyOwner { DiamondBaseStorage.layout().diamondCut(facetCuts, target, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Diamond proxy upgrade interface * @dev see https://eips.ethereum.org/EIPS/eip-2535 */ interface IDiamondWritable { enum FacetCutAction { ADD, REPLACE, REMOVE } event DiamondCut(FacetCut[] facetCuts, address target, bytes data); struct FacetCut { address target; FacetCutAction action; bytes4[] selectors; } /** * @notice update diamond facets and optionally execute arbitrary initialization function * @param facetCuts array of structured Diamond facet update data * @param target optional target of initialization delegatecall * @param data optional initialization function call data */ function diamondCut( FacetCut[] calldata facetCuts, address target, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC1155Internal } from './IERC1155Internal.sol'; import { IERC165 } from '../../introspection/IERC165.sol'; /** * @title ERC1155 interface * @dev see https://github.com/ethereum/EIPs/issues/1155 */ interface IERC1155 is IERC1155Internal, IERC165 { /** * @notice query the balance of given token held by given address * @param account address to query * @param id token to query * @return token balance */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @notice query the balances of given tokens held by given addresses * @param accounts addresss to query * @param ids tokens to query * @return token balances */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @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 whether operator is approved to spend tokens held by account */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @notice grant approval to or revoke approval from given operator to spend held tokens * @param operator address whose approval status to update * @param status whether operator should be considered approved */ function setApprovalForAll(address operator, bool status) external; /** * @notice transfer tokens between given addresses, checking for ERC1155Receiver implementation if applicable * @param from sender of tokens * @param to receiver of tokens * @param id token ID * @param amount quantity of tokens to transfer * @param data data payload */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @notice transfer batch of tokens between given addresses, checking for ERC1155Receiver implementation if applicable * @param from sender of tokens * @param to receiver of tokens * @param ids list of token IDs * @param amounts list of quantities of tokens to transfer * @param data data payload */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC165 } from '../../introspection/IERC165.sol'; /** * @title Partial ERC1155 interface needed by internal functions */ interface IERC1155Internal { event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); event ApprovalForAll( address indexed account, address indexed operator, bool approved ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC1155 metadata extensions */ library ERC1155MetadataStorage { bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.ERC1155Metadata'); struct Layout { string baseURI; mapping(uint256 => string) tokenURIs; } function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC1155MetadataInternal } from './IERC1155MetadataInternal.sol'; /** * @title ERC1155Metadata interface */ interface IERC1155Metadata is IERC1155MetadataInternal { /** * @notice get generated URI for given token * @return token URI */ function uri(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Partial ERC1155Metadata interface needed by internal functions */ interface IERC1155MetadataInternal { event URI(string value, uint256 indexed tokenId); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { UintUtils } from './UintUtils.sol'; library AddressUtils { using UintUtils for uint256; function toString(address account) internal pure returns (string memory) { return uint256(uint160(account)).toHexString(20); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable account, uint256 amount) internal { (bool success, ) = account.call{ value: amount }(''); require(success, 'AddressUtils: failed to send value'); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, 'AddressUtils: failed low-level call'); } function functionCall( address target, bytes memory data, string memory error ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, error); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, 'AddressUtils: failed low-level call with value' ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) internal returns (bytes memory) { require( address(this).balance >= value, 'AddressUtils: insufficient balance for call' ); return _functionCallWithValue(target, data, value, error); } function _functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) private returns (bytes memory) { require( isContract(target), 'AddressUtils: function call to non-contract' ); (bool success, bytes memory returnData) = target.call{ value: value }( data ); if (success) { return returnData; } else if (returnData.length > 0) { assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert(error); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title utility functions for uint256 operations * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license) */ library UintUtils { bytes16 private constant HEX_SYMBOLS = '0123456789abcdef'; function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0'; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0x00'; } uint256 length = 0; for (uint256 temp = value; temp != 0; temp >>= 8) { unchecked { length++; } } return toHexString(value, length); } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; unchecked { for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_SYMBOLS[value & 0xf]; value >>= 4; } } require(value == 0, 'UintUtils: hex length insufficient'); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { MintState, Zone } from "./LandTypes.sol"; library LandStorage { struct Layout { uint8 mintState; uint16 index; // current incremental index of zone id's uint64 price; address signer; address avatars; Zone avatarClaim; // zoneId is zero mapping(uint256 => address) claimedAvatars; mapping(uint16 => Zone) zones; mapping(address => bool) proxies; } bytes32 internal constant STORAGE_SLOT = keccak256("io.frogland.contracts.storage.LandStorage"); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; // slither-disable-next-line timestamp // solhint-disable no-inline-assembly assembly { l.slot := slot } } // Adders function _addClaimCount(uint16 count) internal { layout().avatarClaim.count += count; } function _addCount(uint16 index, uint16 count) internal { Zone storage zone = _getZone(index); _addCount(zone, count); } function _addCount(Zone storage zone, uint16 count) internal { zone.count += count; } function _addInventory(Zone storage zone, uint16 count) internal { zone.max += count; } function _removeInventory(Zone storage zone, uint16 count) internal { zone.max -= count; } function _addZone(Zone memory zone) internal { uint16 index = _getIndex(); index += 1; layout().zones[index] = zone; _setIndex(index); } // Getters function _getClaimedAvatar(uint256 tokenId) internal view returns (address) { return layout().claimedAvatars[tokenId]; } function _getIndex() internal view returns (uint16 index) { return layout().index; } function _getPrice() internal view returns (uint64) { return layout().price; } function _getSigner() internal view returns (address) { return layout().signer; } function _getZone(uint16 index) internal view returns (Zone storage) { if (index == 0) { return layout().avatarClaim; } return layout().zones[index]; } // Setters function _setAvatars(address avatars) internal { layout().avatars = avatars; } function _setClaimedAvatar(uint256 tokenId, address claimedBy) internal { layout().claimedAvatars[tokenId] = claimedBy; } function _setClaimedAvatars(uint256[] memory tokenIds, address claimedBy) internal { for (uint256 index = 0; index < tokenIds.length; index++) { uint256 tokenId = tokenIds[index]; _setClaimedAvatar(tokenId, claimedBy); } } function _setIndex(uint16 index) internal { layout().index = index; } function _setInventory(Zone storage zone, uint16 maxCount) internal { zone.max = maxCount; } function _setPrice(uint64 price) internal { layout().price = price; } function _setProxy(address proxy, bool enabled) internal { layout().proxies[proxy] = enabled; } function _setSigner(address signer) internal { layout().signer = signer; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Enums enum MintState { CLOSED, CLAIM, PRESALE, PUBLIC } // Init Args struct LandInitArgs { address signer; address avatars; uint64 price; Zone avatarClaim; Zone[] zones; } // Structs // waves for sale // each tranche is mapped to a zone by Id // except zone 0 which is the claim // the first 10k are the claim struct Zone { uint8 zoneId; uint16 count; uint16 max; uint24 startIndex; uint24 endIndex; } // requests struct ClaimRequest { address to; uint64 deadline; // block.timestamp uint256[] tokenIds; } struct MintRequest { address to; uint64 deadline; // block.timestamp uint8 zoneId; uint16 count; } struct MintManyRequest { address to; uint64 deadline; uint16[] count; // array by zone index }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; struct RoyaltyInfo { address recipient; uint24 amount; } library ERC2981Storage { struct Layout { RoyaltyInfo royalties; } bytes32 internal constant STORAGE_SLOT = keccak256("IERC2981Royalties.contracts.storage.ERC2981Storage"); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; // slither-disable-next-line timestamp // solhint-disable no-inline-assembly assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo(uint256 _tokenId, uint256 _value) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOpenSeaCompatible { /** * Get the contract metadata */ function contractURI() external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IOpenSeaCompatible } from "./IOpenSeaCompatible.sol"; library OpenSeaCompatibleStorage { struct Layout { string contractURI; } bytes32 internal constant STORAGE_SLOT = keccak256("com.opensea.contracts.storage.OpenSeaCompatibleStorage"); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; // slither-disable-next-line timestamp // solhint-disable no-inline-assembly assembly { l.slot := slot } } } abstract contract OpenSeaCompatibleInternal { function _setContractURI(string memory contractURI) internal virtual { OpenSeaCompatibleStorage.layout().contractURI = contractURI; } } abstract contract OpenSeaCompatible is OpenSeaCompatibleInternal, IOpenSeaCompatible { function contractURI() external view returns (string memory) { return OpenSeaCompatibleStorage.layout().contractURI; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; struct OpenSeaProxyInitArgs { address os721Proxy; address os1155Proxy; } library OpenSeaProxyStorage { struct Layout { address os721Proxy; address os1155Proxy; } bytes32 internal constant STORAGE_SLOT = keccak256("com.opensea.contracts.storage.proxy"); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function _setProxies(OpenSeaProxyInitArgs memory init) internal { _setProxies(init.os721Proxy, init.os1155Proxy); } function _setProxies(address os721Proxy, address os1155Proxy) internal { layout().os721Proxy = os721Proxy; layout().os1155Proxy = os1155Proxy; } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 10000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"avatars","type":"address"},{"internalType":"uint64","name":"price","type":"uint64"},{"components":[{"internalType":"uint8","name":"zoneId","type":"uint8"},{"internalType":"uint16","name":"count","type":"uint16"},{"internalType":"uint16","name":"max","type":"uint16"},{"internalType":"uint24","name":"startIndex","type":"uint24"},{"internalType":"uint24","name":"endIndex","type":"uint24"}],"internalType":"struct Zone","name":"avatarClaim","type":"tuple"},{"components":[{"internalType":"uint8","name":"zoneId","type":"uint8"},{"internalType":"uint16","name":"count","type":"uint16"},{"internalType":"uint16","name":"max","type":"uint16"},{"internalType":"uint24","name":"startIndex","type":"uint24"},{"internalType":"uint24","name":"endIndex","type":"uint24"}],"internalType":"struct Zone[]","name":"zones","type":"tuple[]"}],"internalType":"struct LandInitArgs","name":"landInit","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint24","name":"amount","type":"uint24"}],"internalType":"struct RoyaltyInfo","name":"royaltyInit","type":"tuple"},{"components":[{"internalType":"address","name":"os721Proxy","type":"address"},{"internalType":"address","name":"os1155Proxy","type":"address"}],"internalType":"struct OpenSeaProxyInitArgs","name":"osInit","type":"tuple"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"string","name":"baseURI","type":"string"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610bc9806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f46ef14914610030575b600080fd5b61004361003e366004610975565b610045565b005b807f4281b61aefbe70b3d3f684b428efca5f33077bc240e76f2808f9177c307617f4815161007692602001906105c2565b50817f895ada9fa5e9df33c90596624f0f957c685165e8230b3d0a1d19f54439fabdb381516100a892602001906105c2565b507f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd4655805486517fff00000000000000000000000000000000000000000000000000000000ffff009091166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90921691909102176a02c68af0bb14000000000017815560208601519060010180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905560608501517f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd46558151600291909101805460208401516040850151606086015160809096015160ff9095167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000009093169290921761010061ffff92831602177fffffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffff16630100000091909216027fffffffffffffffffffffffffffffffffffffffffffffffff000000ffffffffff16176501000000000062ffffff94851602177fffffffffffffffffffffffffffffffffffffffffff000000ffffffffffffffff1668010000000000000000939092169290920217905560005b8560800151518160ff1610156102d8576102c686608001518260ff16815181106102b9576102b9610a9d565b6020026020010151610374565b806102d081610afb565b91505061028d565b50837f484af8385c399ca669bc86479c9234930c8574e3f1deada87e45f57e1545e5eb8151815460209093015162ffffff1674010000000000000000000000000000000000000000027fffffffffffffffffff000000000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff9091161791909117905561036d83610521565b5050505050565b7f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd465554610100900461ffff166103aa600182610b1a565b61ffff81811660008181527f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd4659602090815260409182902087518154928901519389015160608a015160808b015160ff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000909516949094176101009588168602177fffffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffff16630100000091909716027fffffffffffffffffffffffffffffffffffffffffffffffff000000ffffffffff16959095176501000000000062ffffff93841602177fffffffffffffffffffffffffffffffffffffffffff000000ffffffffffffffff16680100000000000000009290951691909102939093179092557f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd46558054929091027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff90921691909117905590505050565b6105bf816000015182602001517f683ec2651084e88e7bf4ad71f4d5cb4433c260c38c3dcbb76caed0575152e6c7805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091557f683ec2651084e88e7bf4ad71f4d5cb4433c260c38c3dcbb76caed0575152e6c88054929093169116179055565b50565b8280546105ce90610b40565b90600052602060002090601f0160209004810192826105f05760008555610636565b82601f1061060957805160ff1916838001178555610636565b82800160010185558215610636579182015b8281111561063657825182559160200191906001019061061b565b50610642929150610646565b5090565b5b808211156106425760008155600101610647565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156106ad576106ad61065b565b60405290565b6040805190810167ffffffffffffffff811182821017156106ad576106ad61065b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561071d5761071d61065b565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074957600080fd5b919050565b803561ffff8116811461074957600080fd5b803562ffffff8116811461074957600080fd5b600060a0828403121561078557600080fd5b61078d61068a565b9050813560ff811681146107a057600080fd5b81526107ae6020830161074e565b60208201526107bf6040830161074e565b60408201526107d060608301610760565b60608201526107e160808301610760565b608082015292915050565b600082601f8301126107fd57600080fd5b8135602067ffffffffffffffff8211156108195761081961065b565b610827818360051b016106d6565b82815260a0928302850182019282820191908785111561084657600080fd5b8387015b858110156108695761085c8982610773565b845292840192810161084a565b5090979650505050505050565b60006040828403121561088857600080fd5b6108906106b3565b905061089b82610725565b81526108a960208301610760565b602082015292915050565b6000604082840312156108c657600080fd5b6108ce6106b3565b90506108d982610725565b81526108a960208301610725565b600082601f8301126108f857600080fd5b813567ffffffffffffffff8111156109125761091261065b565b61094360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016106d6565b81815284602083860101111561095857600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060e0868803121561098d57600080fd5b853567ffffffffffffffff808211156109a557600080fd5b90870190610120828a0312156109ba57600080fd5b6109c261068a565b6109cb83610725565b81526109d960208401610725565b6020820152604083013582811681146109f157600080fd5b6040820152610a038a60608501610773565b606082015261010083013582811115610a1b57600080fd5b610a278b8286016107ec565b6080830152509650610a3c8960208a01610876565b9550610a4b8960608a016108b4565b945060a0880135915080821115610a6157600080fd5b610a6d89838a016108e7565b935060c0880135915080821115610a8357600080fd5b50610a90888289016108e7565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff821660ff8103610b1157610b11610acc565b60010192915050565b600061ffff808316818516808303821115610b3757610b37610acc565b01949350505050565b600181811c90821680610b5457607f821691505b602082108103610b8d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea2646970667358221220e73c1924c742a066fb08ffc204e99df7c3e9e5eb36c9ba43195192b4bdf5a37964736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f46ef14914610030575b600080fd5b61004361003e366004610975565b610045565b005b807f4281b61aefbe70b3d3f684b428efca5f33077bc240e76f2808f9177c307617f4815161007692602001906105c2565b50817f895ada9fa5e9df33c90596624f0f957c685165e8230b3d0a1d19f54439fabdb381516100a892602001906105c2565b507f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd4655805486517fff00000000000000000000000000000000000000000000000000000000ffff009091166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90921691909102176a02c68af0bb14000000000017815560208601519060010180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905560608501517f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd46558151600291909101805460208401516040850151606086015160809096015160ff9095167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000009093169290921761010061ffff92831602177fffffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffff16630100000091909216027fffffffffffffffffffffffffffffffffffffffffffffffff000000ffffffffff16176501000000000062ffffff94851602177fffffffffffffffffffffffffffffffffffffffffff000000ffffffffffffffff1668010000000000000000939092169290920217905560005b8560800151518160ff1610156102d8576102c686608001518260ff16815181106102b9576102b9610a9d565b6020026020010151610374565b806102d081610afb565b91505061028d565b50837f484af8385c399ca669bc86479c9234930c8574e3f1deada87e45f57e1545e5eb8151815460209093015162ffffff1674010000000000000000000000000000000000000000027fffffffffffffffffff000000000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff9091161791909117905561036d83610521565b5050505050565b7f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd465554610100900461ffff166103aa600182610b1a565b61ffff81811660008181527f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd4659602090815260409182902087518154928901519389015160608a015160808b015160ff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000909516949094176101009588168602177fffffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffff16630100000091909716027fffffffffffffffffffffffffffffffffffffffffffffffff000000ffffffffff16959095176501000000000062ffffff93841602177fffffffffffffffffffffffffffffffffffffffffff000000ffffffffffffffff16680100000000000000009290951691909102939093179092557f13d5580db47794bc6bf0e22555dccdd93b197ed12f2d11ab1dcf1264c1dd46558054929091027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff90921691909117905590505050565b6105bf816000015182602001517f683ec2651084e88e7bf4ad71f4d5cb4433c260c38c3dcbb76caed0575152e6c7805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091557f683ec2651084e88e7bf4ad71f4d5cb4433c260c38c3dcbb76caed0575152e6c88054929093169116179055565b50565b8280546105ce90610b40565b90600052602060002090601f0160209004810192826105f05760008555610636565b82601f1061060957805160ff1916838001178555610636565b82800160010185558215610636579182015b8281111561063657825182559160200191906001019061061b565b50610642929150610646565b5090565b5b808211156106425760008155600101610647565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156106ad576106ad61065b565b60405290565b6040805190810167ffffffffffffffff811182821017156106ad576106ad61065b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561071d5761071d61065b565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074957600080fd5b919050565b803561ffff8116811461074957600080fd5b803562ffffff8116811461074957600080fd5b600060a0828403121561078557600080fd5b61078d61068a565b9050813560ff811681146107a057600080fd5b81526107ae6020830161074e565b60208201526107bf6040830161074e565b60408201526107d060608301610760565b60608201526107e160808301610760565b608082015292915050565b600082601f8301126107fd57600080fd5b8135602067ffffffffffffffff8211156108195761081961065b565b610827818360051b016106d6565b82815260a0928302850182019282820191908785111561084657600080fd5b8387015b858110156108695761085c8982610773565b845292840192810161084a565b5090979650505050505050565b60006040828403121561088857600080fd5b6108906106b3565b905061089b82610725565b81526108a960208301610760565b602082015292915050565b6000604082840312156108c657600080fd5b6108ce6106b3565b90506108d982610725565b81526108a960208301610725565b600082601f8301126108f857600080fd5b813567ffffffffffffffff8111156109125761091261065b565b61094360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016106d6565b81815284602083860101111561095857600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060e0868803121561098d57600080fd5b853567ffffffffffffffff808211156109a557600080fd5b90870190610120828a0312156109ba57600080fd5b6109c261068a565b6109cb83610725565b81526109d960208401610725565b6020820152604083013582811681146109f157600080fd5b6040820152610a038a60608501610773565b606082015261010083013582811115610a1b57600080fd5b610a278b8286016107ec565b6080830152509650610a3c8960208a01610876565b9550610a4b8960608a016108b4565b945060a0880135915080821115610a6157600080fd5b610a6d89838a016108e7565b935060c0880135915080821115610a8357600080fd5b50610a90888289016108e7565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff821660ff8103610b1157610b11610acc565b60010192915050565b600061ffff808316818516808303821115610b3757610b37610acc565b01949350505050565b600181811c90821680610b5457607f821691505b602082108103610b8d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea2646970667358221220e73c1924c742a066fb08ffc204e99df7c3e9e5eb36c9ba43195192b4bdf5a37964736f6c634300080d0033
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.