UNPKG

@etherspot/contracts

Version:

Etherspot Solidity contracts

176 lines 36.7 kB
{ "address": "0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e", "abi": [ { "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" } ], "transactionHash": "0x8710442a64820abbf2a0d69c611eda0beb5fc8b17db31da5e6c08d571f7a32b2", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", "contractAddress": null, "transactionIndex": 3, "gasUsed": "719562", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0x093e1d0836e86776f06eeb7f0750656222229c2d93104d330c55f19a7ce63e98", "transactionHash": "0x8710442a64820abbf2a0d69c611eda0beb5fc8b17db31da5e6c08d571f7a32b2", "logs": [], "blockNumber": 17842221, "cumulativeGasUsed": "1265439", "status": 1, "byzantium": true }, "args": [], "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"facetAddress(bytes4)\":{\"details\":\"If facet is not found return address(0).\",\"params\":{\"_functionSelector\":\"The function selector.\"},\"returns\":{\"facetAddress_\":\"The facet address.\"}},\"facetAddresses()\":{\"returns\":{\"facetAddresses_\":\"facetAddresses_\"}},\"facetFunctionSelectors(address)\":{\"params\":{\"_facet\":\"The facet address.\"},\"returns\":{\"facetFunctionSelectors_\":\"facetFunctionSelectors_\"}},\"facets()\":{\"returns\":{\"facets_\":\"Facet\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"facetAddress(bytes4)\":{\"notice\":\"Gets the facet that supports the given selector.\"},\"facetAddresses()\":{\"notice\":\"Get all the facet addresses used by a diamond.\"},\"facetFunctionSelectors(address)\":{\"notice\":\"Gets all the function selectors provided by a facet.\"},\"facets()\":{\"notice\":\"Gets all facets and their selectors.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":\"DiamondLoupeFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\nimport { IDiamondLoupe } from \\\"../interfaces/IDiamondLoupe.sol\\\";\\nimport { IERC165 } from \\\"../interfaces/IERC165.sol\\\";\\n\\ncontract DiamondLoupeFacet is IDiamondLoupe, IERC165 {\\n // Diamond Loupe Functions\\n ////////////////////////////////////////////////////////////////////\\n /// These functions are expected to be called frequently by tools.\\n //\\n // struct Facet {\\n // address facetAddress;\\n // bytes4[] functionSelectors;\\n // }\\n\\n /// @notice Gets all facets and their selectors.\\n /// @return facets_ Facet\\n function facets() external view override returns (Facet[] memory facets_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n uint256 numFacets = ds.facetAddresses.length;\\n facets_ = new Facet[](numFacets);\\n for (uint256 i = 0; i < numFacets; i++) {\\n address facetAddress_ = ds.facetAddresses[i];\\n facets_[i].facetAddress = facetAddress_;\\n facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors;\\n }\\n }\\n\\n /// @notice Gets all the function selectors provided by a facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet)\\n external\\n view\\n override\\n returns (bytes4[] memory facetFunctionSelectors_)\\n {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors;\\n }\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view override returns (address[] memory facetAddresses_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddresses_ = ds.facetAddresses;\\n }\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress;\\n }\\n\\n // This implements ERC-165.\\n function supportsInterface(bytes4 _interfaceId) external view override returns (bool) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n return ds.supportedInterfaces[_interfaceId];\\n }\\n}\\n\",\"keccak256\":\"0xf544f602fa01f82f15ff8f2257255c6ff82dcef3c2d57b4e3b6598a8cf61dc1a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\n// A loupe is a small magnifying glass used to look at diamonds.\\n// These functions look at diamonds\\ninterface IDiamondLoupe {\\n /// These functions are expected to be called frequently\\n /// by tools.\\n\\n struct Facet {\\n address facetAddress;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xc710a1bd0523868e5f6972f3f3cc1cf37a5020ef13d3805e76b13fe952a9614a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceId The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\",\"keccak256\":\"0x1734ad5b8c2f4c805ed7e20d62627db8747ff8b9929007f982e76f798cf67e50\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", "devdoc": { "kind": "dev", "methods": { "facetAddress(bytes4)": { "details": "If facet is not found return address(0).", "params": { "_functionSelector": "The function selector." }, "returns": { "facetAddress_": "The facet address." } }, "facetAddresses()": { "returns": { "facetAddresses_": "facetAddresses_" } }, "facetFunctionSelectors(address)": { "params": { "_facet": "The facet address." }, "returns": { "facetFunctionSelectors_": "facetFunctionSelectors_" } }, "facets()": { "returns": { "facets_": "Facet" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "facetAddress(bytes4)": { "notice": "Gets the facet that supports the given selector." }, "facetAddresses()": { "notice": "Get all the facet addresses used by a diamond." }, "facetFunctionSelectors(address)": { "notice": "Gets all the function selectors provided by a facet." }, "facets()": { "notice": "Gets all facets and their selectors." } }, "version": 1 }, "storageLayout": { "storage": [], "types": null } }