Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 38274503 | 682 days ago | IN | 0 POL | 0.10804385 |
Loading...
Loading
Contract Name:
DiamondLoupeFacet
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import { LibDiamond } from "../libraries/LibDiamond.sol"; import { IDiamondLoupe } from "../interfaces/IDiamondLoupe.sol"; import { IERC165 } from "../interfaces/IERC165.sol"; // The functions in DiamondLoupeFacet MUST be added to a diamond. // The EIP-2535 Diamond standard requires these functions contract DiamondLoupeFacet is IDiamondLoupe, IERC165 { // Diamond Loupe Functions //////////////////////////////////////////////////////////////////// /// These functions are expected to be called frequently by tools. // // struct Facet { // address facetAddress; // bytes4[] functionSelectors; // } /// @notice Gets all facets and their selectors. /// @return facets_ Facet function facets() external override view returns (Facet[] memory facets_) { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); facets_ = new Facet[](ds.selectorCount); uint8[] memory numFacetSelectors = new uint8[](ds.selectorCount); uint256 numFacets; uint256 selectorIndex; // loop through function selectors for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) { bytes32 slot = ds.selectorSlots[slotIndex]; for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) { selectorIndex++; if (selectorIndex > ds.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); address facetAddress_ = address(bytes20(ds.facets[selector])); bool continueLoop; for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { if (facets_[facetIndex].facetAddress == facetAddress_) { facets_[facetIndex].functionSelectors[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; } facets_[numFacets].facetAddress = facetAddress_; facets_[numFacets].functionSelectors = new bytes4[](ds.selectorCount); facets_[numFacets].functionSelectors[0] = selector; numFacetSelectors[numFacets] = 1; numFacets++; } } for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { uint256 numSelectors = numFacetSelectors[facetIndex]; bytes4[] memory selectors = facets_[facetIndex].functionSelectors; // setting the number of selectors assembly { mstore(selectors, numSelectors) } } // setting the number of facets assembly { mstore(facets_, numFacets) } } /// @notice Gets all the function selectors supported by a specific facet. /// @param _facet The facet address. /// @return _facetFunctionSelectors The selectors associated with a facet address. function facetFunctionSelectors(address _facet) external override view returns (bytes4[] memory _facetFunctionSelectors) { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); uint256 numSelectors; _facetFunctionSelectors = new bytes4[](ds.selectorCount); uint256 selectorIndex; // loop through function selectors for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) { bytes32 slot = ds.selectorSlots[slotIndex]; for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) { selectorIndex++; if (selectorIndex > ds.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); address facet = address(bytes20(ds.facets[selector])); if (_facet == facet) { _facetFunctionSelectors[numSelectors] = selector; numSelectors++; } } } // Set the number of selectors in the array assembly { mstore(_facetFunctionSelectors, numSelectors) } } /// @notice Get all the facet addresses used by a diamond. /// @return facetAddresses_ function facetAddresses() external override view returns (address[] memory facetAddresses_) { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); facetAddresses_ = new address[](ds.selectorCount); uint256 numFacets; uint256 selectorIndex; // loop through function selectors for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) { bytes32 slot = ds.selectorSlots[slotIndex]; for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) { selectorIndex++; if (selectorIndex > ds.selectorCount) { break; } bytes4 selector = bytes4(slot << (selectorSlotIndex << 5)); address facetAddress_ = address(bytes20(ds.facets[selector])); bool continueLoop; for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) { if (facetAddress_ == facetAddresses_[facetIndex]) { continueLoop = true; break; } } if (continueLoop) { continue; } facetAddresses_[numFacets] = facetAddress_; numFacets++; } } // Set the number of facet addresses in the array assembly { mstore(facetAddresses_, numFacets) } } /// @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 override view returns (address facetAddress_) { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); facetAddress_ = address(bytes20(ds.facets[_functionSelector])); } // This implements ERC-165. function supportsInterface(bytes4 _interfaceId) external override view returns (bool) { LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); return ds.supportedInterfaces[_interfaceId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ // 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.0; interface IERC165 { /// @notice Query if a contract implements an interface /// @param interfaceId The interface identifier, as specified in ERC-165 /// @dev Interface identification is specified in ERC-165. This function /// uses less than 30,000 gas. /// @return `true` if the contract implements `interfaceID` and /// `interfaceID` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import { IDiamondCut } from "../interfaces/IDiamondCut.sol"; // Remember to add the loupe functions from DiamondLoupeFacet to the diamond. // The loupe functions are required by the EIP2535 Diamonds standard library LibDiamond { bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); struct DiamondStorage { // maps function selectors to the facets that execute the functions. // and maps the selectors to their position in the selectorSlots array. // func selector => address facet, selector position mapping(bytes4 => bytes32) facets; // array of slots of function selectors. // each slot holds 8 function selectors. mapping(uint256 => bytes32) selectorSlots; // The number of function selectors in selectorSlots uint16 selectorCount; // 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 } } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function setContractOwner(address _newOwner) internal { DiamondStorage storage ds = diamondStorage(); address previousOwner = ds.contractOwner; ds.contractOwner = _newOwner; emit 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"); } event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff)); bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224)); // Internal function version of diamondCut // This code is almost the same as the external diamondCut, // except it is using 'Facet[] memory _diamondCut' instead of // 'Facet[] calldata _diamondCut'. // The code is duplicated to prevent copying calldata to memory which // causes an error for a two dimensional array. function diamondCut( IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata ) internal { DiamondStorage storage ds = diamondStorage(); uint256 originalSelectorCount = ds.selectorCount; uint256 selectorCount = originalSelectorCount; bytes32 selectorSlot; // Check if last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // get last selectorSlot // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" selectorSlot = ds.selectorSlots[selectorCount >> 3]; } // loop through diamond cut for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors( selectorCount, selectorSlot, _diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].action, _diamondCut[facetIndex].functionSelectors ); } if (selectorCount != originalSelectorCount) { ds.selectorCount = uint16(selectorCount); } // If last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" ds.selectorSlots[selectorCount >> 3] = selectorSlot; } emit DiamondCut(_diamondCut, _init, _calldata); initializeDiamondCut(_init, _calldata); } function addReplaceRemoveFacetSelectors( uint256 _selectorCount, bytes32 _selectorSlot, address _newFacetAddress, IDiamondCut.FacetCutAction _action, bytes4[] memory _selectors ) internal returns (uint256, bytes32) { DiamondStorage storage ds = diamondStorage(); require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); if (_action == IDiamondCut.FacetCutAction.Add) { enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code"); for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists"); // add facet for selector ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount); // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" 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) { // "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8" ds.selectorSlots[_selectorCount >> 3] = _selectorSlot; _selectorSlot = 0; } _selectorCount++; } } else if (_action == IDiamondCut.FacetCutAction.Replace) { enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code"); for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; address oldFacetAddress = address(bytes20(oldFacet)); // only useful if immutable functions exist require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function"); require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function"); require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist"); // replace old facet address ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress); } } else if (_action == IDiamondCut.FacetCutAction.Remove) { require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); // "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8" uint256 selectorSlotCount = _selectorCount >> 3; // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" uint256 selectorInSlotIndex = _selectorCount & 7; for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { if (_selectorSlot == 0) { // get last selectorSlot selectorSlotCount--; _selectorSlot = ds.selectorSlots[selectorSlotCount]; selectorInSlotIndex = 7; } else { selectorInSlotIndex--; } bytes4 lastSelector; uint256 oldSelectorsSlotCount; uint256 oldSelectorInSlotPosition; // adding a block here prevents stack too deep error { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); // only useful if immutable functions exist require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function"); // replace selector with last selector in ds.facets // gets the last selector lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5)); if (lastSelector != selector) { // update last selector slot position info ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]); } delete ds.facets[selector]; uint256 oldSelectorCount = uint16(uint256(oldFacet)); // "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8" oldSelectorsSlotCount = oldSelectorCount >> 3; // "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8" oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5; } if (oldSelectorsSlotCount != selectorSlotCount) { bytes32 oldSelectorSlot = ds.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 ds.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 ds.selectorSlots[selectorSlotCount]; _selectorSlot = 0; } } _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex; } else { revert("LibDiamondCut: Incorrect FacetCutAction"); } return (_selectorCount, _selectorSlot); } 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.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ 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; event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes4","name":"_functionSelector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facetAddress_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"facetAddresses_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"_facetFunctionSelectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"facets_","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610b73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80637a0ed627116100505780637a0ed627146100e2578063adfca15e146100f7578063cdffacc61461011757600080fd5b806301ffc9a71461006c57806352ef6b2c146100cd575b600080fd5b6100b861007a366004610944565b6001600160e01b03191660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d561017b565b6040516100c49190610975565b6100ea610358565b6040516100c49190610a07565b61010a610105366004610a84565b6107ba565b6040516100c49190610aad565b610163610125366004610944565b6001600160e01b03191660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c602052604090205460601c90565b6040516001600160a01b0390911681526020016100c4565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff1667ffffffffffffffff8111156101de576101de610ac0565b604051908082528060200260200182016040528015610207578160200160208202803683370190505b50915060008060005b600284015461ffff16821015610350576000818152600185016020526040812054905b600881101561033b578361024681610aec565b600288015490955061ffff1685111590506102605761033b565b600581901b82901b6001600160e01b0319811660009081526020889052604081205460601c90805b888110156102de578a81815181106102a2576102a2610b07565b60200260200101516001600160a01b0316836001600160a01b031614156102cc57600191506102de565b806102d681610aec565b915050610288565b5080156102ed57505050610329565b818a898151811061030057610300610b07565b6001600160a01b03909216602092830291909101909101528761032281610aec565b9850505050505b8061033381610aec565b915050610233565b5050808061034890610aec565b915050610210565b505082525090565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff1667ffffffffffffffff8111156103bb576103bb610ac0565b60405190808252806020026020018201604052801561040157816020015b6040805180820190915260008152606060208201528152602001906001900390816103d95790505b50600282015490925060009061ffff1667ffffffffffffffff81111561042957610429610ac0565b604051908082528060200260200182016040528015610452578160200160208202803683370190505b50905060008060005b600285015461ffff16821015610748576000818152600186016020526040812054905b6008811015610733578361049181610aec565b600289015490955061ffff1685111590506104ab57610733565b600581901b82901b6001600160e01b0319811660009081526020899052604081205460601c90805b888110156105f157826001600160a01b03168c82815181106104f7576104f7610b07565b6020026020010151600001516001600160a01b031614156105df57838c828151811061052557610525610b07565b6020026020010151602001518b838151811061054357610543610b07565b602002602001015160ff168151811061055e5761055e610b07565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060ff8a828151811061059457610594610b07565b602002602001015160ff16106105a957600080fd5b8981815181106105bb576105bb610b07565b6020026020010180518091906105d090610b1d565b60ff16905250600191506105f1565b806105e981610aec565b9150506104d3565b50801561060057505050610721565b818b898151811061061357610613610b07565b60209081029190910101516001600160a01b03909116905260028a015461ffff1667ffffffffffffffff81111561064c5761064c610ac0565b604051908082528060200260200182016040528015610675578160200160208202803683370190505b508b898151811061068857610688610b07565b602002602001015160200181905250828b89815181106106aa576106aa610b07565b6020026020010151602001516000815181106106c8576106c8610b07565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060018989815181106106fe576106fe610b07565b60ff909216602092830291909101909101528761071a81610aec565b9850505050505b8061072b81610aec565b91505061047e565b5050808061074090610aec565b91505061045b565b5060005b828110156107af57600084828151811061076857610768610b07565b602002602001015160ff169050600087838151811061078957610789610b07565b6020026020010151602001519050818152505080806107a790610aec565b91505061074c565b508185525050505090565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9060009061ffff1667ffffffffffffffff81111561082057610820610ac0565b604051908082528060200260200182016040528015610849578160200160208202803683370190505b5092506000805b600284015461ffff1682101561093a576000818152600185016020526040812054905b6008811015610925578361088681610aec565b600288015490955061ffff1685111590506108a057610925565b600581901b82901b6001600160e01b0319811660009081526020889052604090205460601c6001600160a01b038a1681141561091057818988815181106108e9576108e9610b07565b6001600160e01b0319909216602092830291909101909101528661090c81610aec565b9750505b5050808061091d90610aec565b915050610873565b5050808061093290610aec565b915050610850565b5050825250919050565b60006020828403121561095657600080fd5b81356001600160e01b03198116811461096e57600080fd5b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156109b65783516001600160a01b031683529284019291840191600101610991565b50909695505050505050565b600081518084526020808501945080840160005b838110156109fc5781516001600160e01b031916875295820195908201906001016109d6565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610a7657888303603f19018552815180516001600160a01b03168452870151878401879052610a63878501826109c2565b9588019593505090860190600101610a2e565b509098975050505050505050565b600060208284031215610a9657600080fd5b81356001600160a01b038116811461096e57600080fd5b60208152600061096e60208301846109c2565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415610b0057610b00610ad6565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415610b3457610b34610ad6565b6001019291505056fea26469706673582212209a3192ad831c760391942929d778e241a99cb9ec61601738ad20f68d41aa091364736f6c634300080b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100675760003560e01c80637a0ed627116100505780637a0ed627146100e2578063adfca15e146100f7578063cdffacc61461011757600080fd5b806301ffc9a71461006c57806352ef6b2c146100cd575b600080fd5b6100b861007a366004610944565b6001600160e01b03191660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d561017b565b6040516100c49190610975565b6100ea610358565b6040516100c49190610a07565b61010a610105366004610a84565b6107ba565b6040516100c49190610aad565b610163610125366004610944565b6001600160e01b03191660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c602052604090205460601c90565b6040516001600160a01b0390911681526020016100c4565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff1667ffffffffffffffff8111156101de576101de610ac0565b604051908082528060200260200182016040528015610207578160200160208202803683370190505b50915060008060005b600284015461ffff16821015610350576000818152600185016020526040812054905b600881101561033b578361024681610aec565b600288015490955061ffff1685111590506102605761033b565b600581901b82901b6001600160e01b0319811660009081526020889052604081205460601c90805b888110156102de578a81815181106102a2576102a2610b07565b60200260200101516001600160a01b0316836001600160a01b031614156102cc57600191506102de565b806102d681610aec565b915050610288565b5080156102ed57505050610329565b818a898151811061030057610300610b07565b6001600160a01b03909216602092830291909101909101528761032281610aec565b9850505050505b8061033381610aec565b915050610233565b5050808061034890610aec565b915050610210565b505082525090565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff1667ffffffffffffffff8111156103bb576103bb610ac0565b60405190808252806020026020018201604052801561040157816020015b6040805180820190915260008152606060208201528152602001906001900390816103d95790505b50600282015490925060009061ffff1667ffffffffffffffff81111561042957610429610ac0565b604051908082528060200260200182016040528015610452578160200160208202803683370190505b50905060008060005b600285015461ffff16821015610748576000818152600186016020526040812054905b6008811015610733578361049181610aec565b600289015490955061ffff1685111590506104ab57610733565b600581901b82901b6001600160e01b0319811660009081526020899052604081205460601c90805b888110156105f157826001600160a01b03168c82815181106104f7576104f7610b07565b6020026020010151600001516001600160a01b031614156105df57838c828151811061052557610525610b07565b6020026020010151602001518b838151811061054357610543610b07565b602002602001015160ff168151811061055e5761055e610b07565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060ff8a828151811061059457610594610b07565b602002602001015160ff16106105a957600080fd5b8981815181106105bb576105bb610b07565b6020026020010180518091906105d090610b1d565b60ff16905250600191506105f1565b806105e981610aec565b9150506104d3565b50801561060057505050610721565b818b898151811061061357610613610b07565b60209081029190910101516001600160a01b03909116905260028a015461ffff1667ffffffffffffffff81111561064c5761064c610ac0565b604051908082528060200260200182016040528015610675578160200160208202803683370190505b508b898151811061068857610688610b07565b602002602001015160200181905250828b89815181106106aa576106aa610b07565b6020026020010151602001516000815181106106c8576106c8610b07565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060018989815181106106fe576106fe610b07565b60ff909216602092830291909101909101528761071a81610aec565b9850505050505b8061072b81610aec565b91505061047e565b5050808061074090610aec565b91505061045b565b5060005b828110156107af57600084828151811061076857610768610b07565b602002602001015160ff169050600087838151811061078957610789610b07565b6020026020010151602001519050818152505080806107a790610aec565b91505061074c565b508185525050505090565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e546060907fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9060009061ffff1667ffffffffffffffff81111561082057610820610ac0565b604051908082528060200260200182016040528015610849578160200160208202803683370190505b5092506000805b600284015461ffff1682101561093a576000818152600185016020526040812054905b6008811015610925578361088681610aec565b600288015490955061ffff1685111590506108a057610925565b600581901b82901b6001600160e01b0319811660009081526020889052604090205460601c6001600160a01b038a1681141561091057818988815181106108e9576108e9610b07565b6001600160e01b0319909216602092830291909101909101528661090c81610aec565b9750505b5050808061091d90610aec565b915050610873565b5050808061093290610aec565b915050610850565b5050825250919050565b60006020828403121561095657600080fd5b81356001600160e01b03198116811461096e57600080fd5b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156109b65783516001600160a01b031683529284019291840191600101610991565b50909695505050505050565b600081518084526020808501945080840160005b838110156109fc5781516001600160e01b031916875295820195908201906001016109d6565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610a7657888303603f19018552815180516001600160a01b03168452870151878401879052610a63878501826109c2565b9588019593505090860190600101610a2e565b509098975050505050505050565b600060208284031215610a9657600080fd5b81356001600160a01b038116811461096e57600080fd5b60208152600061096e60208301846109c2565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415610b0057610b00610ad6565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415610b3457610b34610ad6565b6001019291505056fea26469706673582212209a3192ad831c760391942929d778e241a99cb9ec61601738ad20f68d41aa091364736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.