Contract 0x0cab6977a9c70e04458b740476b498b214019641

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5f396c9246225a5fd5a995f87e8b13bd892d0c6da6483202a1ca71fca12fd342Fill Batch Signe...37383952024-02-29 18:08:572 mins ago0x46bb02eee3c523323611631010359281a809b7c8 IN  Element: ElementEx0.000879 ETH0.000082535328
0xfb1007f03bde34e7dc9ec2796a1ed5e3e84f5c3571e91e86a9ab14d426ed9e39Buy ERC1155Ex37383882024-02-29 18:08:362 mins ago0x585ceec0c8579c2d443cfab4c25154cf70489780 IN  Element: ElementEx0.00007 ETH0.000058560192
0xd66bb4fae2068a43f8487b96b1f3168ab919e9c7146257cf09a3c8e64eab59deBuy ERC1155Ex37383622024-02-29 18:07:183 mins ago0x445e789cfaa17cf97415b9bb413a86223c019535 IN  Element: ElementEx0.00001 ETH0.00005352048
0x9e3e660f0d9eb56207384f15344c0da2e42f022bd45081a0cb83605236883f26Fill Batch Signe...37383242024-02-29 18:05:175 mins ago0x1152f9fdd7ca42b85e3bf058dc841bcd984ed292 IN  Element: ElementEx0.000879 ETH0.000066529296
0x8f272a74f107967eaed81861404b93698580a03ec69630af8884b791a13fdaacFill Batch Signe...37382742024-02-29 18:02:478 mins ago0x4c2d0f9556ffe0e42113f3ebab45816117975dd2 IN  Element: ElementEx0.00009399 ETH0.000083189376
0x69c19374bbfd580dc0104e06b7b5968c117361e38387c31ccd6df44212ca9d8eBuy ERC1155Ex37382592024-02-29 18:02:029 mins ago0xf38428af3c0c752a4696581caf8ffc250246cbbf IN  Element: ElementEx0.00001 ETH0.00005352048
0xce812915728afbed2c99fd1f06530664517a3c8e47f10fd32c2f8d94045492d1Buy ERC1155Ex37382542024-02-29 18:01:479 mins ago0x90825e50eb2a183ae56b0b304ef0f9281415b0fc IN  Element: ElementEx0.00005 ETH0.000054451872
0x5015aabd501a1624b6a3f23fe85972e1ae02c4e5547b59855b1978a12c154adfBuy ERC1155Ex37382342024-02-29 18:00:4710 mins ago0xf694066fb9fb3bf27a79517589ad295a286e655d IN  Element: ElementEx0.00007 ETH0.00005352048
0x027a90f996af9dfd12713e12e9ade6f521e157aec8282aa30711ae7679e2175dBuy ERC1155Ex37382102024-02-29 17:59:1411 mins ago0xf694066fb9fb3bf27a79517589ad295a286e655d IN  Element: ElementEx0.00005 ETH0.000054446688
0xa43a59947eb260a54b8cedad5e60b5c4966696b0a2d188ca5c35bdca971f9a9aBuy ERC1155Ex37381482024-02-29 17:56:0814 mins ago0x3b15432151ce851fbdd8a46462596ff5bbb3ee63 IN  Element: ElementEx0.00005 ETH0.000054451872
0xb3f43fb7277c646706e0eabc274eda23d2bfee3208c214e1ad77db218898dcdaFill Batch Signe...37381432024-02-29 17:55:5315 mins ago0x3d3f31a513b3db176820c9ac819e226afcf135d6 IN  Element: ElementEx0.00014999 ETH0.00008717544
0x5b44c9681feb5d95efc554a45132ba1a94ba8ab59777758760a200808bdacef9Buy ERC1155Ex37381132024-02-29 17:54:2316 mins ago0x3b68131895ec619204636f8e5ab0bad552c20a36 IN  Element: ElementEx0.00005 ETH0.000054451872
0x2f34af61642e559945a3e687baf76443430006d324cc895b4e5c8075d2fe0954Fill Batch Signe...37381032024-02-29 17:53:5317 mins ago0xdf37f13b95838adc449b838449fa1a2804f3f3ba IN  Element: ElementEx0.0008 ETH0.000066259728
0xa2450830fd893b1ea06c2b113a3884af2e1b384664975edf3ea16bed1baff2eaBuy ERC1155Ex37380702024-02-29 17:52:1418 mins ago0x3f52bb3e0df0d0b863ecedb5d3a6dfdcddb9e950 IN  Element: ElementEx0.00001 ETH0.00005352048
0x89adaa7ea290317378af1a7705061e595cac88e82c41a460c5fbf230190d69b1Buy ERC1155Ex37379652024-02-29 17:46:5824 mins ago0xf40db907e9941325e94d11d15b7b0b50649c3c09 IN  Element: ElementEx0.00001 ETH0.0000557505
0xb4ae269f06e8c2ac4160e4e447a08f2c31925743e35e3c21b0f3e116aab0aba0Fill Batch Signe...37379042024-02-29 17:43:4327 mins ago0xaf04586bc32d63052e56da071f021c798a56a7b4 IN  Element: ElementEx0.00015 ETH0.000062992944
0x141eaebc4e8a3107845af222993e0420d5d5043daa03c439b483d61d86519a73Fill Batch Signe...37378632024-02-29 17:41:3929 mins ago0x90b04b5e432db9ce6aab32b0dffa42d0a57ac2a6 IN  Element: ElementEx0.00088 ETH0.00006374808
0x327148dcffe2de57b0e6960c7f8a0cd15f22977483fc72ac9d3316a7aeeb81ceFill Batch Signe...37378572024-02-29 17:41:2129 mins ago0xb5301f799b28bcd82f9cdc89fe80830871a9de23 IN  Element: ElementEx0.0008 ETH0.000085555008
0x668844448e101d4dfd6cd985b6e0b89764860b90d4e25e625fd8a5a3fffc45fcBuy ERC1155Ex37378512024-02-29 17:41:0330 mins ago0x90b04b5e432db9ce6aab32b0dffa42d0a57ac2a6 IN  Element: ElementEx0.00005 ETH0.000054451872
0x41ec970367a2e3bbe813876083bf3b1c51fc09ca3a87e336ef066d02696ad3a3Fill Batch Signe...37378362024-02-29 17:40:1830 mins ago0x3f78cef5743b735b3a49d41beaf9b42c550cc0b3 IN  Element: ElementEx0.00088 ETH0.000074763216
0xa4a9629a785f42e81cd15f8900dd087d553b695b80ad20057da1706d89b9ca68Buy ERC1155Ex37378212024-02-29 17:39:3331 mins ago0x448565190fb4a7bd19ebae733b39a1be01a732e2 IN  Element: ElementEx0.00001 ETH0.00005352048
0xcde2b2ba277af6f913e98c38b01028d8f3d43656539a2d1792b741b1000e88a2Fill Batch Signe...37378182024-02-29 17:39:2431 mins ago0x3f78cef5743b735b3a49d41beaf9b42c550cc0b3 IN  Element: ElementEx0.0008 ETH0.00006042816
0x40b194278277310b11ebcaa1f768d43b755575dbd39771afa9b296353b5e0eddBuy ERC1155Ex37378162024-02-29 17:39:1831 mins ago0xf4392af5e132c5c056d6b2edadd1424768403d73 IN  Element: ElementEx0.00001 ETH0.000053515296
0xdb565dec9f4e8d60febd9dc88b95a69dab9acca3f6d24944cb67cead46bfe589Fill Batch Signe...37377922024-02-29 17:38:0633 mins ago0x2a9a3933a9633e1e9efc9c4fdcf618edb241ae81 IN  Element: ElementEx0.0008 ETH0.000085555008
0x6c876a1ba706cee30a62b8a2ff85952b03823a0b30dd2a82b933575896718955Buy ERC1155Ex37377562024-02-29 17:36:0934 mins ago0x86637839654760868a138891236f27f0dbfa81a3 IN  Element: ElementEx0.00006 ETH0.000053530848
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5f396c9246225a5fd5a995f87e8b13bd892d0c6da6483202a1ca71fca12fd34237383952024-02-29 18:08:572 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.00001758 ETH
0x5f396c9246225a5fd5a995f87e8b13bd892d0c6da6483202a1ca71fca12fd34237383952024-02-29 18:08:572 mins ago Element: ElementEx0x916bbe845c424dc9317e8b815ca18f207a12c84a0.00086142 ETH
0xfb1007f03bde34e7dc9ec2796a1ed5e3e84f5c3571e91e86a9ab14d426ed9e3937383882024-02-29 18:08:362 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000014 ETH
0xfb1007f03bde34e7dc9ec2796a1ed5e3e84f5c3571e91e86a9ab14d426ed9e3937383882024-02-29 18:08:362 mins ago Element: ElementEx0x252cb6a61abb7b5576ada333d0712efab8ca92110.0000686 ETH
0xd66bb4fae2068a43f8487b96b1f3168ab919e9c7146257cf09a3c8e64eab59de37383622024-02-29 18:07:183 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000002 ETH
0xd66bb4fae2068a43f8487b96b1f3168ab919e9c7146257cf09a3c8e64eab59de37383622024-02-29 18:07:183 mins ago Element: ElementEx0x348a59c7e0289af7c1b0a25839ffddcd9ac65dce0.0000098 ETH
0x9e3e660f0d9eb56207384f15344c0da2e42f022bd45081a0cb83605236883f2637383242024-02-29 18:05:175 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.00001758 ETH
0x9e3e660f0d9eb56207384f15344c0da2e42f022bd45081a0cb83605236883f2637383242024-02-29 18:05:175 mins ago Element: ElementEx0x905f90e157ff56b3dbd928d8b215c7acde6926b30.00077352 ETH
0x9e3e660f0d9eb56207384f15344c0da2e42f022bd45081a0cb83605236883f2637383242024-02-29 18:05:175 mins ago Element: ElementEx0x905f90e157ff56b3dbd928d8b215c7acde6926b30.0000879 ETH
0x8f272a74f107967eaed81861404b93698580a03ec69630af8884b791a13fdaac37382742024-02-29 18:02:478 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000018798 ETH
0x8f272a74f107967eaed81861404b93698580a03ec69630af8884b791a13fdaac37382742024-02-29 18:02:478 mins ago Element: ElementEx0x905f90e157ff56b3dbd928d8b215c7acde6926b30.0000827112 ETH
0x8f272a74f107967eaed81861404b93698580a03ec69630af8884b791a13fdaac37382742024-02-29 18:02:478 mins ago Element: ElementEx0x905f90e157ff56b3dbd928d8b215c7acde6926b30.000009399 ETH
0x69c19374bbfd580dc0104e06b7b5968c117361e38387c31ccd6df44212ca9d8e37382592024-02-29 18:02:029 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000002 ETH
0x69c19374bbfd580dc0104e06b7b5968c117361e38387c31ccd6df44212ca9d8e37382592024-02-29 18:02:029 mins ago Element: ElementEx0x348a59c7e0289af7c1b0a25839ffddcd9ac65dce0.0000098 ETH
0xce812915728afbed2c99fd1f06530664517a3c8e47f10fd32c2f8d94045492d137382542024-02-29 18:01:479 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.000001 ETH
0xce812915728afbed2c99fd1f06530664517a3c8e47f10fd32c2f8d94045492d137382542024-02-29 18:01:479 mins ago Element: ElementEx0x020768507198ec993773986a60f0ba31f7fa8f730.000049 ETH
0x5015aabd501a1624b6a3f23fe85972e1ae02c4e5547b59855b1978a12c154adf37382342024-02-29 18:00:4710 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000014 ETH
0x5015aabd501a1624b6a3f23fe85972e1ae02c4e5547b59855b1978a12c154adf37382342024-02-29 18:00:4710 mins ago Element: ElementEx0x348a59c7e0289af7c1b0a25839ffddcd9ac65dce0.0000686 ETH
0x027a90f996af9dfd12713e12e9ade6f521e157aec8282aa30711ae7679e2175d37382102024-02-29 17:59:1411 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.000001 ETH
0x027a90f996af9dfd12713e12e9ade6f521e157aec8282aa30711ae7679e2175d37382102024-02-29 17:59:1411 mins ago Element: ElementEx0x020768507198ec993773986a60f0ba31f7fa8f730.000049 ETH
0xa43a59947eb260a54b8cedad5e60b5c4966696b0a2d188ca5c35bdca971f9a9a37381482024-02-29 17:56:0814 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.000001 ETH
0xa43a59947eb260a54b8cedad5e60b5c4966696b0a2d188ca5c35bdca971f9a9a37381482024-02-29 17:56:0814 mins ago Element: ElementEx0x020768507198ec993773986a60f0ba31f7fa8f730.000049 ETH
0xb3f43fb7277c646706e0eabc274eda23d2bfee3208c214e1ad77db218898dcda37381432024-02-29 17:55:5315 mins ago Element: ElementEx0x7538262ae993ca117a0e481f908209137a46268e0.0000029998 ETH
0xb3f43fb7277c646706e0eabc274eda23d2bfee3208c214e1ad77db218898dcda37381432024-02-29 17:55:5315 mins ago Element: ElementEx0xa1f26490cfc4097ebdef8191cf5613c66cfe6d800.0001319912 ETH
0xb3f43fb7277c646706e0eabc274eda23d2bfee3208c214e1ad77db218898dcda37381432024-02-29 17:55:5315 mins ago Element: ElementEx0xa1f26490cfc4097ebdef8191cf5613c66cfe6d800.000014999 ETH
[ Download CSV Export 
Index Block
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ElementEx

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : ElementEx.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;

import "./features/interfaces/IOwnableFeature.sol";
import "./features/interfaces/ISimpleFunctionRegistryFeature.sol";
import "./storage/LibProxyStorage.sol";
import "./storage/LibSimpleFunctionRegistryStorage.sol";
import "./storage/LibOwnableStorage.sol";

/// @dev An extensible proxy contract that serves as a universal entry point for
///      interacting with the 0x protocol.
contract ElementEx {

    constructor(address registryFeature, address ownableFeature) {
        // Initialize RegistryFeature.
        _extend(ISimpleFunctionRegistryFeature.registerMethods.selector, registryFeature);
        _extend(ISimpleFunctionRegistryFeature.extend.selector, registryFeature);
        _extend(ISimpleFunctionRegistryFeature.rollback.selector, registryFeature);
        _extend(ISimpleFunctionRegistryFeature.getRollbackLength.selector, registryFeature);
        _extend(ISimpleFunctionRegistryFeature.getRollbackEntryAtIndex.selector, registryFeature);

        // Initialize OwnableFeature.
        _extend(IOwnableFeature.transferOwnership.selector, ownableFeature);
        _extend(IOwnableFeature.owner.selector, ownableFeature);

        // Transfer ownership to the real owner.
        LibOwnableStorage.getStorage().owner = msg.sender;
    }

    /// @dev Forwards calls to the appropriate implementation contract.
    fallback() external payable {
        address impl = LibProxyStorage.getStorage().impls[msg.sig];
        assembly {
            if impl {
                calldatacopy(0, 0, calldatasize())
                if delegatecall(gas(), impl, 0, calldatasize(), 0, 0) {
                    // Success, copy the returned data and return.
                    returndatacopy(0, 0, returndatasize())
                    return(0, returndatasize())
                }

                // Failed, copy the returned data and revert.
                returndatacopy(0, 0, returndatasize())
                revert(0, returndatasize())
            }
        }
        revert("METHOD_NOT_IMPLEMENTED");
    }

    /// @dev Fallback for just receiving ether.
    receive() external payable {}

    /// @dev Get the implementation contract of a registered function.
    /// @param selector The function selector.
    /// @return impl The implementation contract address.
    function getFunctionImplementation(bytes4 selector) public view returns (address impl) {
        return LibProxyStorage.getStorage().impls[selector];
    }

    event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);

    function _extend(bytes4 selector, address impl) private {
        LibSimpleFunctionRegistryStorage.Storage storage stor = LibSimpleFunctionRegistryStorage.getStorage();
        LibProxyStorage.Storage storage proxyStor = LibProxyStorage.getStorage();

        address oldImpl = proxyStor.impls[selector];
        address[] storage history = stor.implHistory[selector];
        history.push(oldImpl);
        proxyStor.impls[selector] = impl;
        emit ProxyFunctionUpdated(selector, oldImpl, impl);
    }
}

File 2 of 7 : IOwnableFeature.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;


// solhint-disable no-empty-blocks
/// @dev Owner management and migration features.
interface IOwnableFeature {

    /// @dev Emitted by Ownable when ownership is transferred.
    /// @param previousOwner The previous owner of the contract.
    /// @param newOwner The new owner of the contract.
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @dev Transfers ownership of the contract to a new address.
    /// @param newOwner The address that will become the owner.
    function transferOwnership(address newOwner) external;

    /// @dev The owner of this contract.
    /// @return ownerAddress The owner address.
    function owner() external view returns (address ownerAddress);
}

File 3 of 7 : ISimpleFunctionRegistryFeature.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;


/// @dev Basic registry management features.
interface ISimpleFunctionRegistryFeature {

    /// @dev A function implementation was updated via `extend()` or `rollback()`.
    /// @param selector The function selector.
    /// @param oldImpl The implementation contract address being replaced.
    /// @param newImpl The replacement implementation contract address.
    event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);

    function registerMethods(address impl, bytes4[] calldata methodIDs) external;

    /// @dev Roll back to a prior implementation of a function.
    /// @param selector The function selector.
    /// @param targetImpl The address of an older implementation of the function.
    function rollback(bytes4 selector, address targetImpl) external;

    /// @dev Register or replace a function.
    /// @param selector The function selector.
    /// @param impl The implementation contract for the function.
    function extend(bytes4 selector, address impl) external;

    /// @dev Retrieve the length of the rollback history for a function.
    /// @param selector The function selector.
    /// @return rollbackLength The number of items in the rollback history for
    ///         the function.
    function getRollbackLength(bytes4 selector) external view returns (uint256);

    /// @dev Retrieve an entry in the rollback history for a function.
    /// @param selector The function selector.
    /// @param idx The index in the rollback history.
    /// @return impl An implementation address for the function at
    ///         index `idx`.
    function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)
        external
        view
        returns (address impl);
}

File 4 of 7 : LibOwnableStorage.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;

import "./LibStorage.sol";


/// @dev Storage helpers for the `Ownable` feature.
library LibOwnableStorage {

    /// @dev Storage bucket for this feature.
    struct Storage {
        // The owner of this contract.
        address owner;
    }

    /// @dev Get the storage bucket for this contract.
    function getStorage() internal pure returns (Storage storage stor) {
        uint256 storageSlot = LibStorage.STORAGE_ID_OWNABLE;
        // Dip into assembly to change the slot pointed to by the local
        // variable `stor`.
        // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries
        assembly { stor.slot := storageSlot }
    }
}

File 5 of 7 : LibProxyStorage.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;

import "./LibStorage.sol";


/// @dev Storage helpers for the proxy contract.
library LibProxyStorage {

    /// @dev Storage bucket for proxy contract.
    struct Storage {
        // Mapping of function selector -> function implementation
        mapping(bytes4 => address) impls;
    }

    /// @dev Get the storage bucket for this contract.
    function getStorage() internal pure returns (Storage storage stor) {
        uint256 storageSlot = LibStorage.STORAGE_ID_PROXY;
        // Dip into assembly to change the slot pointed to by the local
        // variable `stor`.
        // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries
        assembly { stor.slot := storageSlot }
    }
}

File 6 of 7 : LibSimpleFunctionRegistryStorage.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.13;

import "./LibStorage.sol";


/// @dev Storage helpers for the `SimpleFunctionRegistry` feature.
library LibSimpleFunctionRegistryStorage {

    /// @dev Storage bucket for this feature.
    struct Storage {
        // Mapping of function selector -> implementation history.
        mapping(bytes4 => address[]) implHistory;
    }

    /// @dev Get the storage bucket for this contract.
    function getStorage() internal pure returns (Storage storage stor) {
        uint256 storageSlot = LibStorage.STORAGE_ID_SIMPLE_FUNCTION_REGISTRY;
        // Dip into assembly to change the slot pointed to by the local
        // variable `stor`.
        // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries
        assembly { stor.slot := storageSlot }
    }
}

File 7 of 7 : LibStorage.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Modifications Copyright 2022 Element.Market
  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.8.17;


/// @dev Common storage helpers
library LibStorage {

    /// @dev What to bit-shift a storage ID by to get its slot.
    ///      This gives us a maximum of 2**128 inline fields in each bucket.
    uint256 constant STORAGE_ID_PROXY = 1 << 128;
    uint256 constant STORAGE_ID_SIMPLE_FUNCTION_REGISTRY = 2 << 128;
    uint256 constant STORAGE_ID_OWNABLE = 3 << 128;
    uint256 constant STORAGE_ID_COMMON_NFT_ORDERS = 4 << 128;
    uint256 constant STORAGE_ID_ERC721_ORDERS = 5 << 128;
    uint256 constant STORAGE_ID_ERC1155_ORDERS = 6 << 128;
    uint256 constant STORAGE_ID_REENTRANCY_GUARD = 7 << 128;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"registryFeature","type":"address"},{"internalType":"address","name":"ownableFeature","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"address","name":"oldImpl","type":"address"},{"indexed":false,"internalType":"address","name":"newImpl","type":"address"}],"name":"ProxyFunctionUpdated","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"getFunctionImplementation","outputs":[{"internalType":"address","name":"impl","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516103c53803806103c583398101604081905261002f916101e4565b610040634f333d3560e01b836100df565b610051636eb224cb60e01b836100df565b610062630276d92960e61b836100df565b61007363dfd0074960e01b836100df565b6100846335d35de160e11b836100df565b61009563f2fde38b60e01b826100df565b6100a6638da5cb5b60e01b826100df565b336100b96101b060201b6101281760201c565b80546001600160a01b0319166001600160a01b0392909216919091179055506102179050565b60006100f36101b860201b6101301760201c565b905060006101096101c060201b6101201760201c565b6001600160e01b03198516600081815260208381526040808320805488845282852080546001810182558187528587200180546001600160a01b039384166001600160a01b03199182168117909255968890528886528354909616918b16918217909255825185815293840152949550919392917f2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab687598367910160405180910390a2505050505050565b600360801b90565b600160811b90565b600160801b90565b80516001600160a01b03811681146101df57600080fd5b919050565b600080604083850312156101f757600080fd5b610200836101c8565b915061020e602084016101c8565b90509250929050565b61019f806102266000396000f3fe6080604052600436106100225760003560e01c8063972fdd26146100c157610029565b3661002957005b600080356001600160e01b0319168152600160801b60205260409020546001600160a01b0316801561007c573660008037600080366000845af415610072573d6000803e3d6000f35b3d6000803e3d6000fd5b60405162461bcd60e51b81526020600482015260166024820152751351551213d117d393d517d25354131153515395115160521b604482015260640160405180910390fd5b3480156100cd57600080fd5b506101046100dc366004610138565b6001600160e01b0319166000908152600160801b60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200160405180910390f35b600160801b90565b600360801b90565b600160811b90565b60006020828403121561014a57600080fd5b81356001600160e01b03198116811461016257600080fd5b939250505056fea26469706673582212203588dbfc6f5e8cd38c018c75f8526c68b4e5e05f8fe0dd0b346ff0b328550ab364736f6c6343000811003300000000000000000000000010e6d9e9b746ed71fa728c92d41b401f05f2cf4e00000000000000000000000018cd9270dbdca86d470cfb3be1b156241fffa9de

Deployed Bytecode

0x6080604052600436106100225760003560e01c8063972fdd26146100c157610029565b3661002957005b600080356001600160e01b0319168152600160801b60205260409020546001600160a01b0316801561007c573660008037600080366000845af415610072573d6000803e3d6000f35b3d6000803e3d6000fd5b60405162461bcd60e51b81526020600482015260166024820152751351551213d117d393d517d25354131153515395115160521b604482015260640160405180910390fd5b3480156100cd57600080fd5b506101046100dc366004610138565b6001600160e01b0319166000908152600160801b60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200160405180910390f35b600160801b90565b600360801b90565b600160811b90565b60006020828403121561014a57600080fd5b81356001600160e01b03198116811461016257600080fd5b939250505056fea26469706673582212203588dbfc6f5e8cd38c018c75f8526c68b4e5e05f8fe0dd0b346ff0b328550ab364736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000010e6d9e9b746ed71fa728c92d41b401f05f2cf4e00000000000000000000000018cd9270dbdca86d470cfb3be1b156241fffa9de

-----Decoded View---------------
Arg [0] : registryFeature (address): 0x10e6d9e9b746ed71fa728c92d41b401f05f2cf4e
Arg [1] : ownableFeature (address): 0x18cd9270dbdca86d470cfb3be1b156241fffa9de

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000010e6d9e9b746ed71fa728c92d41b401f05f2cf4e
Arg [1] : 00000000000000000000000018cd9270dbdca86d470cfb3be1b156241fffa9de


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.