ETH Price: $2,450.17 (-0.04%)

Contract

0xED3084c98148e2528DaDCB53C56352e549C488fA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Governance E...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000181693.44646494
Set Eth Usd Chai...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000259413.44646494
Set Governance T...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000177243.44646494
Set Stable Swap ...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000177363.44646494
Set Stable Usd C...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000259573.44646494
Update Chain Lin...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000223473.44646494
Set Collateral C...198590512024-05-13 5:37:35114 days ago1715578655IN
0xED3084c9...549C488fA
0 ETH0.000242513.44646494
Set Dollar Token...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000163153.17032992
Set Collateral R...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000166333.17032992
Set Price Thresh...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000237663.17032992
Set Redemption D...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.00016613.17032992
Set Fees198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000126693.17032992
Toggle Collatera...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.0001813.17032992
Add Collateral T...198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.001448983.17032992
Grant Role198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000266383.17032992
Grant Role198590502024-05-13 5:37:23114 days ago1715578643IN
0xED3084c9...549C488fA
0 ETH0.000266383.17032992
0x60806040198590502024-05-13 5:37:23114 days ago1715578643IN
 Create: Diamond
0 ETH0.011652063.17032992

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Diamond

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 20000 runs

Other Settings:
paris EvmVersion
File 1 of 10 : Diamond.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {LibDiamond} from "./libraries/LibDiamond.sol";
import {IDiamondCut} from "./interfaces/IDiamondCut.sol";
import {IDiamondLoupe} from "./interfaces/IDiamondLoupe.sol";
import "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IERC173} from "./interfaces/IERC173.sol";
import {DiamondCutFacet} from "./facets/DiamondCutFacet.sol";
import {DiamondLoupeFacet} from "./facets/DiamondLoupeFacet.sol";
import {OwnershipFacet} from "./facets/OwnershipFacet.sol";

/// @notice Struct used for `Diamond` constructor args
struct DiamondArgs {
    address owner;
    address init;
    bytes initCalldata;
}

/**
 * @notice Contract that implements diamond proxy pattern
 * @dev Main protocol's entrypoint
 */
contract Diamond {
    /**
     * @notice Diamond constructor
     * @param _args Init args
     * @param _diamondCutFacets Facets with selectors to add
     */
    constructor(
        DiamondArgs memory _args,
        IDiamondCut.FacetCut[] memory _diamondCutFacets
    ) {
        LibDiamond.setContractOwner(_args.owner);
        LibDiamond.diamondCut(
            _diamondCutFacets,
            _args.init,
            _args.initCalldata
        );
    }

    /**
     * @notice Finds facet for function that is called and executes the
     * function if a facet is found and returns any value
     */
    fallback() external payable {
        LibDiamond.DiamondStorage storage ds;
        bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
        address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;
        require(msg.data.length >= 4, "Diamond: Selector is too short");
        require(facet != address(0), "Diamond: Function does not exist");
        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }
}

File 2 of 10 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {IDiamondCut} from "../interfaces/IDiamondCut.sol";
import {IDiamondLoupe} from "../interfaces/IDiamondLoupe.sol";
import "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IERC173} from "../interfaces/IERC173.sol";

/// @notice Error thrown when `initializeDiamondCut()` fails
error InitializationFunctionReverted(
    address _initializationContractAddress,
    bytes _calldata
);

/**
 * @notice Library used for diamond facets and selector modifications
 * @dev Remember to add the loupe functions from DiamondLoupeFacet to the diamond.
 * The loupe functions are required by the EIP2535 Diamonds standard.
 */
library LibDiamond {
    /// @notice Storage slot used to store data for this library
    bytes32 constant DIAMOND_STORAGE_POSITION =
        bytes32(uint256(keccak256("diamond.standard.diamond.storage")) - 1) &
            ~bytes32(uint256(0xff));

    /// @notice Struct used as a mapping of facet to function selector position
    struct FacetAddressAndPosition {
        address facetAddress;
        uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array
    }

    /// @notice Struct used as a mapping of facet to function selectors
    struct FacetFunctionSelectors {
        bytes4[] functionSelectors;
        uint256 facetAddressPosition; // position of facetAddress in facetAddresses array
    }

    /// @notice Struct used as a storage for this library
    struct DiamondStorage {
        // maps function selector to the facet address and
        // the position of the selector in the facetFunctionSelectors.selectors array
        mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;
        // maps facet addresses to function selectors
        mapping(address => FacetFunctionSelectors) facetFunctionSelectors;
        // facet addresses
        address[] facetAddresses;
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // owner of the contract
        address contractOwner;
    }

    /**
     * @notice Returns struct used as a storage for this library
     * @return ds Struct used as a storage
     */
    function diamondStorage()
        internal
        pure
        returns (DiamondStorage storage ds)
    {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }

    /// @notice Emitted when contract owner is updated
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @notice Updates contract owner
     * @param _newOwner New contract owner
     */
    function setContractOwner(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        address previousOwner = ds.contractOwner;
        ds.contractOwner = _newOwner;
        emit OwnershipTransferred(previousOwner, _newOwner);
    }

    /**
     * @notice Returns contract owner
     * @param contractOwner_ Contract owner
     */
    function contractOwner() internal view returns (address contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner;
    }

    /// @notice Checks that `msg.sender` is a contract owner
    function enforceIsContractOwner() internal view {
        require(
            msg.sender == diamondStorage().contractOwner,
            "LibDiamond: Must be contract owner"
        );
    }

    /// @notice Emitted when facet is modified
    event DiamondCut(
        IDiamondCut.FacetCut[] _diamondCut,
        address _init,
        bytes _calldata
    );

    /**
     * @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
     * @dev `_calldata` is executed with delegatecall on `_init`
     */
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        for (
            uint256 facetIndex;
            facetIndex < _diamondCut.length;
            facetIndex++
        ) {
            IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;
            if (action == IDiamondCut.FacetCutAction.Add) {
                addFunctions(
                    _diamondCut[facetIndex].facetAddress,
                    _diamondCut[facetIndex].functionSelectors
                );
            } else if (action == IDiamondCut.FacetCutAction.Replace) {
                replaceFunctions(
                    _diamondCut[facetIndex].facetAddress,
                    _diamondCut[facetIndex].functionSelectors
                );
            } else if (action == IDiamondCut.FacetCutAction.Remove) {
                removeFunctions(
                    _diamondCut[facetIndex].facetAddress,
                    _diamondCut[facetIndex].functionSelectors
                );
            } else {
                revert("LibDiamondCut: Incorrect FacetCutAction");
            }
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    /**
     * @notice Adds new functions to a facet
     * @param _facetAddress Facet address
     * @param _functionSelectors Function selectors to add
     */
    function addFunctions(
        address _facetAddress,
        bytes4[] memory _functionSelectors
    ) internal {
        require(
            _functionSelectors.length > 0,
            "LibDiamondCut: No selectors in facet to cut"
        );
        DiamondStorage storage ds = diamondStorage();
        require(
            _facetAddress != address(0),
            "LibDiamondCut: Add facet can't be address(0)"
        );
        uint96 selectorPosition = uint96(
            ds.facetFunctionSelectors[_facetAddress].functionSelectors.length
        );
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);
        }
        for (
            uint256 selectorIndex;
            selectorIndex < _functionSelectors.length;
            selectorIndex++
        ) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds
                .selectorToFacetAndPosition[selector]
                .facetAddress;
            require(
                oldFacetAddress == address(0),
                "LibDiamondCut: Can't add function that already exists"
            );
            addFunction(ds, selector, selectorPosition, _facetAddress);
            selectorPosition++;
        }
    }

    /**
     * @notice Replaces functions in a facet
     * @param _facetAddress Facet address
     * @param _functionSelectors Function selectors to replace with
     */
    function replaceFunctions(
        address _facetAddress,
        bytes4[] memory _functionSelectors
    ) internal {
        require(
            _functionSelectors.length > 0,
            "LibDiamondCut: No selectors in facet to cut"
        );
        DiamondStorage storage ds = diamondStorage();
        require(
            _facetAddress != address(0),
            "LibDiamondCut: Add facet can't be address(0)"
        );
        uint96 selectorPosition = uint96(
            ds.facetFunctionSelectors[_facetAddress].functionSelectors.length
        );
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);
        }
        for (
            uint256 selectorIndex;
            selectorIndex < _functionSelectors.length;
            selectorIndex++
        ) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds
                .selectorToFacetAndPosition[selector]
                .facetAddress;
            require(
                oldFacetAddress != _facetAddress,
                "LibDiamondCut: Can't replace function with same function"
            );
            removeFunction(ds, oldFacetAddress, selector);
            addFunction(ds, selector, selectorPosition, _facetAddress);
            selectorPosition++;
        }
    }

    /**
     * @notice Removes functions from a facet
     * @param _facetAddress Facet address
     * @param _functionSelectors Function selectors to remove
     */
    function removeFunctions(
        address _facetAddress,
        bytes4[] memory _functionSelectors
    ) internal {
        require(
            _functionSelectors.length > 0,
            "LibDiamondCut: No selectors in facet to cut"
        );
        DiamondStorage storage ds = diamondStorage();
        // if function does not exist then do nothing and return
        require(
            _facetAddress == address(0),
            "LibDiamondCut: Remove facet address must be address(0)"
        );
        for (
            uint256 selectorIndex;
            selectorIndex < _functionSelectors.length;
            selectorIndex++
        ) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds
                .selectorToFacetAndPosition[selector]
                .facetAddress;
            removeFunction(ds, oldFacetAddress, selector);
        }
    }

    /**
     * @notice Adds a new diamond facet
     * @param ds Struct used as a storage
     * @param _facetAddress Facet address to add
     */
    function addFacet(
        DiamondStorage storage ds,
        address _facetAddress
    ) internal {
        enforceHasContractCode(
            _facetAddress,
            "LibDiamondCut: New facet has no code"
        );
        ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds
            .facetAddresses
            .length;
        ds.facetAddresses.push(_facetAddress);
    }

    /**
     * @notice Adds new function to a facet
     * @param ds Struct used as a storage
     * @param _selector Function selector to add
     * @param _selectorPosition Position in `FacetFunctionSelectors.functionSelectors` array
     * @param _facetAddress Facet address
     */
    function addFunction(
        DiamondStorage storage ds,
        bytes4 _selector,
        uint96 _selectorPosition,
        address _facetAddress
    ) internal {
        ds
            .selectorToFacetAndPosition[_selector]
            .functionSelectorPosition = _selectorPosition;
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(
            _selector
        );
        ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;
    }

    /**
     * @notice Removes function from a facet
     * @param ds Struct used as a storage
     * @param _facetAddress Facet address
     * @param _selector Function selector to add
     */
    function removeFunction(
        DiamondStorage storage ds,
        address _facetAddress,
        bytes4 _selector
    ) internal {
        require(
            _facetAddress != address(0),
            "LibDiamondCut: Can't remove function that doesn't exist"
        );
        // precomputed diamondCut function selector to save gas
        // bytes4(keccak256(abi.encodeWithSignature("diamondCut((address,uint8,bytes4[])[],address,bytes)"))) == 0x1f931c1c
        require(
            _selector != bytes4(0x1f931c1c),
            "LibDiamondCut: Can't remove diamondCut function"
        );
        // an immutable function is a function defined directly in a diamond
        require(
            _facetAddress != address(this),
            "LibDiamondCut: Can't remove immutable function"
        );
        // replace selector with last selector, then delete last selector
        uint256 selectorPosition = ds
            .selectorToFacetAndPosition[_selector]
            .functionSelectorPosition;
        uint256 lastSelectorPosition = ds
            .facetFunctionSelectors[_facetAddress]
            .functionSelectors
            .length - 1;
        // if not the same then replace _selector with lastSelector
        if (selectorPosition != lastSelectorPosition) {
            bytes4 lastSelector = ds
                .facetFunctionSelectors[_facetAddress]
                .functionSelectors[lastSelectorPosition];
            ds.facetFunctionSelectors[_facetAddress].functionSelectors[
                selectorPosition
            ] = lastSelector;
            ds
                .selectorToFacetAndPosition[lastSelector]
                .functionSelectorPosition = uint96(selectorPosition);
        }
        // delete the last selector
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();
        delete ds.selectorToFacetAndPosition[_selector];

        // if no more selectors for facet address then delete the facet address
        if (lastSelectorPosition == 0) {
            // replace facet address with last facet address and delete last facet address
            uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;
            uint256 facetAddressPosition = ds
                .facetFunctionSelectors[_facetAddress]
                .facetAddressPosition;
            if (facetAddressPosition != lastFacetAddressPosition) {
                address lastFacetAddress = ds.facetAddresses[
                    lastFacetAddressPosition
                ];
                ds.facetAddresses[facetAddressPosition] = lastFacetAddress;
                ds
                    .facetFunctionSelectors[lastFacetAddress]
                    .facetAddressPosition = facetAddressPosition;
            }
            ds.facetAddresses.pop();
            delete ds
                .facetFunctionSelectors[_facetAddress]
                .facetAddressPosition;
        }
    }

    /**
     * @notice Function called on diamond cut modification
     * @param _init The address of the contract or facet to execute _calldata
     * @param _calldata A function call, including function selector and arguments
     * @dev `_calldata` is executed with delegatecall on `_init`
     */
    function initializeDiamondCut(
        address _init,
        bytes memory _calldata
    ) internal {
        if (_init == address(0)) {
            return;
        }
        enforceHasContractCode(
            _init,
            "LibDiamondCut: _init address has no code"
        );
        (bool success, bytes memory error) = _init.delegatecall(_calldata);
        if (!success) {
            if (error.length > 0) {
                // bubble up error
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(error)
                    revert(add(32, error), returndata_size)
                }
            } else {
                revert InitializationFunctionReverted(_init, _calldata);
            }
        }
    }

    /**
     * @notice Reverts if `_contract` address doesn't have any code
     * @param _contract Contract address to check for empty code
     * @param _errorMessage Error message
     */
    function enforceHasContractCode(
        address _contract,
        string memory _errorMessage
    ) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}

File 3 of 10 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/// @notice Interface that allows modifications to diamond function selector mapping
interface IDiamondCut {
    /**
     * @notice Available diamond operations
     * @dev Add=0, Replace=1, Remove=2
     */
    enum FacetCutAction {
        Add,
        Replace,
        Remove
    }

    /// @notice Struct used as a mapping of facet to function selectors
    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
     * @dev `_calldata` is executed with delegatecall on `_init`
     */
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    /// @notice Emitted when facet selectors are modified
    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}

File 4 of 10 : IDiamondLoupe.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/**
 * @notice A loupe is a small magnifying glass used to look at diamonds.
 * These functions look at diamonds.
 * @dev These functions are expected to be called frequently by 3rd party tools.
 */
interface IDiamondLoupe {
    /// @notice Struct used as a mapping of facet to function selectors
    struct Facet {
        address facetAddress;
        bytes4[] functionSelectors;
    }

    /**
     * @notice Returns all facet addresses and their four byte function selectors
     * @return facets_ Facets with function selectors
     */
    function facets() external view returns (Facet[] memory facets_);

    /**
     * @notice Returns all function selectors supported by a specific facet
     * @param _facet Facet address
     * @return facetFunctionSelectors_ Function selectors for a particular facet
     */
    function facetFunctionSelectors(
        address _facet
    ) external view returns (bytes4[] memory facetFunctionSelectors_);

    /**
     * @notice Returns all facet addresses used by a diamond
     * @return facetAddresses_ Facet addresses in a diamond
     */
    function facetAddresses()
        external
        view
        returns (address[] memory facetAddresses_);

    /**
     * @notice Returns the facet that supports the given selector
     * @dev If facet is not found returns `address(0)`
     * @param _functionSelector Function selector
     * @return facetAddress_ Facet address
     */
    function facetAddress(
        bytes4 _functionSelector
    ) external view returns (address facetAddress_);
}

File 5 of 10 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 6 of 10 : IERC173.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/**
 * @notice ERC-173 Contract Ownership Standard
 * @dev ERC-165 identifier for this interface is 0x7f5828d0
 */
interface IERC173 {
    /// @notice Emits when ownership of a contract changes
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @notice Returns owner's address
     * @return owner_ Owner address
     */
    function owner() external view returns (address owner_);

    /**
     * @notice Sets contract's owner to a new address
     * @dev Set _newOwner to address(0) to renounce any ownership
     * @param _newOwner The address of the new owner of the contract
     */
    function transferOwnership(address _newOwner) external;
}

File 7 of 10 : DiamondCutFacet.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {IDiamondCut} from "../interfaces/IDiamondCut.sol";
import {LibDiamond} from "../libraries/LibDiamond.sol";

/**
 * @notice Facet used for diamond selector modifications
 * @dev Remember to add the loupe functions from DiamondLoupeFacet to the diamond.
 * The loupe functions are required by the EIP2535 Diamonds standard.
 */
contract DiamondCutFacet is IDiamondCut {
    /// @inheritdoc IDiamondCut
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external override {
        LibDiamond.enforceIsContractOwner();
        LibDiamond.diamondCut(_diamondCut, _init, _calldata);
    }
}

File 8 of 10 : DiamondLoupeFacet.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {LibDiamond} from "../libraries/LibDiamond.sol";
import {IDiamondLoupe} from "../interfaces/IDiamondLoupe.sol";
import "@openzeppelin/contracts/interfaces/IERC165.sol";

/**
 * @notice A loupe is a small magnifying glass used to look at diamonds.
 * These functions look at diamonds.
 * @dev These functions are expected to be called frequently by 3rd party tools.
 * @dev The functions in DiamondLoupeFacet MUST be added to a diamond.
 * The EIP-2535 Diamond standard requires these functions.
 */
contract DiamondLoupeFacet is IDiamondLoupe, IERC165 {
    /// @inheritdoc IDiamondLoupe
    function facets() external view override returns (Facet[] memory facets_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        uint256 numFacets = ds.facetAddresses.length;
        facets_ = new Facet[](numFacets);
        for (uint256 i = 0; i < numFacets; ) {
            address facetAddress_ = ds.facetAddresses[i];
            facets_[i].facetAddress = facetAddress_;
            facets_[i].functionSelectors = ds
                .facetFunctionSelectors[facetAddress_]
                .functionSelectors;
            unchecked {
                i++;
            }
        }
    }

    /// @inheritdoc IDiamondLoupe
    function facetFunctionSelectors(
        address _facet
    ) external view override returns (bytes4[] memory facetFunctionSelectors_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facetFunctionSelectors_ = ds
            .facetFunctionSelectors[_facet]
            .functionSelectors;
    }

    /// @inheritdoc IDiamondLoupe
    function facetAddresses()
        external
        view
        override
        returns (address[] memory facetAddresses_)
    {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facetAddresses_ = ds.facetAddresses;
    }

    /// @inheritdoc IDiamondLoupe
    function facetAddress(
        bytes4 _functionSelector
    ) external view override returns (address facetAddress_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facetAddress_ = ds
            .selectorToFacetAndPosition[_functionSelector]
            .facetAddress;
    }

    /**
     * @notice Returns `true` if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     * @return Whether contract supports a provided interface
     */
    function supportsInterface(
        bytes4 _interfaceId
    ) external view override returns (bool) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        return ds.supportedInterfaces[_interfaceId];
    }
}

File 9 of 10 : OwnershipFacet.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {LibDiamond} from "../libraries/LibDiamond.sol";
import {IERC173} from "../interfaces/IERC173.sol";

/// @notice Used for managing contract's owner
contract OwnershipFacet is IERC173 {
    /// @inheritdoc IERC173
    function transferOwnership(address _newOwner) external override {
        require(
            (_newOwner != address(0)),
            "OwnershipFacet: New owner cannot be the zero address"
        );
        LibDiamond.enforceIsContractOwner();
        LibDiamond.setContractOwner(_newOwner);
    }

    /// @inheritdoc IERC173
    function owner() external view override returns (address owner_) {
        owner_ = LibDiamond.contractOwner();
    }
}

File 10 of 10 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "solidity-linked-list/=lib/solidity-linked-list/",
    "@uniswap/v2-core/contracts/=lib/Uniswap/v2-core/contracts/",
    "@uniswap/v2-periphery/contracts/=lib/Uniswap/v2-periphery/contracts/",
    "@uniswap/v3-periphery/contracts/=lib/Uniswap/v3-periphery/contracts/",
    "abdk/=lib/abdk-libraries-solidity/",
    "operator-filter-registry/=lib/operator-filter-registry/src/",
    "@chainlink/=lib/chainlink-brownie-contracts/contracts/src/v0.8/",
    "Uniswap/=lib/Uniswap/",
    "abdk-libraries-solidity/=lib/abdk-libraries-solidity/",
    "chainlink-brownie-contracts/=lib/chainlink-brownie-contracts/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"init","type":"address"},{"internalType":"bytes","name":"initCalldata","type":"bytes"}],"internalType":"struct DiamondArgs","name":"_args","type":"tuple"},{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCutFacets","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_initializationContractAddress","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"InitializationFunctionReverted","type":"error"},{"stateMutability":"payable","type":"fallback"}]

60806040523480156200001157600080fd5b506040516200182f3803806200182f8339810160408190526200003491620011f2565b8151620000419062000064565b6200005c8183602001518460400151620000c660201b60201c565b505062001568565b60006200007062000321565b6004810180546001600160a01b038581166001600160a01b031983168117909355604051939450169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60005b8351811015620002d2576000848281518110620000ea57620000ea6200130a565b6020026020010151602001519050600060028111156200010e576200010e62001320565b81600281111562000123576200012362001320565b0362000181576200017b8583815181106200014257620001426200130a565b6020026020010151600001518684815181106200016357620001636200130a565b6020026020010151604001516200035b60201b60201c565b620002bc565b600181600281111562000198576200019862001320565b03620001f0576200017b858381518110620001b757620001b76200130a565b602002602001015160000151868481518110620001d857620001d86200130a565b602002602001015160400151620005e660201b60201c565b600281600281111562000207576200020762001320565b036200025f576200017b8583815181106200022657620002266200130a565b6020026020010151600001518684815181106200024757620002476200130a565b6020026020010151604001516200087c60201b60201c565b60405162461bcd60e51b815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f727265637420466163657443756044820152663a20b1ba34b7b760c91b60648201526084015b60405180910390fd5b5080620002c9816200134c565b915050620000c9565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620003089392919062001396565b60405180910390a16200031c8282620009e0565b505050565b60008060ff196200035460017fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6200149d565b1692915050565b6000815111620003b15760405162461bcd60e51b815260206004820152602b60248201526000805160206200180f83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401620002b3565b6000620003bd62000321565b90506001600160a01b0383166200041b5760405162461bcd60e51b815260206004820152602c6024820152600080516020620017cb83398151915260448201526b65206164647265737328302960a01b6064820152608401620002b3565b6001600160a01b0383166000908152600182016020526040812054906001600160601b0382169003620004545762000454828562000ab2565b60005b8351811015620005df5760008482815181106200047857620004786200130a565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b03168015620005205760405162461bcd60e51b815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152608401620002b3565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b03191617905583620005c481620014b9565b94505050508080620005d6906200134c565b91505062000457565b5050505050565b60008151116200063c5760405162461bcd60e51b815260206004820152602b60248201526000805160206200180f83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401620002b3565b60006200064862000321565b90506001600160a01b038316620006a65760405162461bcd60e51b815260206004820152602c6024820152600080516020620017cb83398151915260448201526b65206164647265737328302960a01b6064820152608401620002b3565b6001600160a01b0383166000908152600182016020526040812054906001600160601b0382169003620006df57620006df828562000ab2565b60005b8351811015620005df5760008482815181106200070357620007036200130a565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b039081169087168103620007b05760405162461bcd60e51b815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152608401620002b3565b620007bd85828462000b1f565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b031916179055836200086181620014b9565b9450505050808062000873906200134c565b915050620006e2565b6000815111620008d25760405162461bcd60e51b815260206004820152602b60248201526000805160206200180f83398151915260448201526a1858d95d081d1bc818dd5d60aa1b6064820152608401620002b3565b6000620008de62000321565b90506001600160a01b038316156200095f5760405162461bcd60e51b815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152608401620002b3565b60005b8251811015620009da5760008382815181106200098357620009836200130a565b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b0316620009c284828462000b1f565b50508080620009d1906200134c565b91505062000962565b50505050565b6001600160a01b038216620009f3575050565b62000a1882604051806060016040528060288152602001620017a36028913962000f79565b600080836001600160a01b03168360405162000a359190620014ea565b600060405180830381855af49150503d806000811462000a72576040519150601f19603f3d011682016040523d82523d6000602084013e62000a77565b606091505b509150915081620009da5780511562000a935780518082602001fd5b838360405163192105d760e01b8152600401620002b392919062001508565b62000ad781604051806060016040528060248152602001620017eb6024913962000f79565b6002820180546001600160a01b0390921660008181526001948501602090815260408220860185905594840183559182529290200180546001600160a01b0319169091179055565b6001600160a01b03821662000b9d5760405162461bcd60e51b815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152608401620002b3565b63381b38f960e21b6001600160e01b031982160162000c175760405162461bcd60e51b815260206004820152602f60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f7665206469616d60448201526e37b73221baba10333ab731ba34b7b760891b6064820152608401620002b3565b306001600160a01b0383160362000c885760405162461bcd60e51b815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201526d3a30b1363290333ab731ba34b7b760911b6064820152608401620002b3565b6001600160e01b03198116600090815260208481526040808320546001600160a01b0386168452600180880190935290832054600160a01b9091046001600160601b0316929162000cd9916200149d565b905080821462000dd2576001600160a01b0384166000908152600186016020526040812080548390811062000d125762000d126200130a565b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811062000d665762000d666200130a565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b03199290921682528690526040902080546001600160a01b0316600160a01b6001600160601b038516021790555b6001600160a01b0384166000908152600186016020526040902080548062000dfe5762000dfe62001536565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b03198516825286905260408120819055819003620005df57600285015460009062000e64906001906200149d565b6001600160a01b038616600090815260018089016020526040909120015490915080821462000f1a57600087600201838154811062000ea75762000ea76200130a565b6000918252602090912001546002890180546001600160a01b03909216925082918490811062000edb5762000edb6200130a565b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055929091168152600189810190925260409020018190555b8660020180548062000f305762000f3062001536565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b8181620009da5760405162461bcd60e51b8152600401620002b391906200154c565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000fd85762000fd862000f9d565b60405290565b604051601f8201601f191681016001600160401b038111828210171562001009576200100962000f9d565b604052919050565b80516001600160a01b03811681146200102957600080fd5b919050565b60005b838110156200104b57818101518382015260200162001031565b50506000910152565b60006001600160401b0382111562001070576200107062000f9d565b5060051b60200190565b600082601f8301126200108c57600080fd5b81516020620010a56200109f8362001054565b62000fde565b828152600592831b8501820192828201919087851115620010c557600080fd5b8387015b85811015620011e55780516001600160401b0380821115620010eb5760008081fd5b908901906060828c03601f1901811315620011065760008081fd5b6200111062000fb3565b6200111d89850162001011565b815260408085015160038110620011345760008081fd5b828b01529184015191838311156200114c5760008081fd5b82850194508d603f8601126200116457600093508384fd5b898501519350620011796200109f8562001054565b84815293871b85018101938a810193508e851115620011985760008081fd5b948101945b84861015620011d05785516001600160e01b031981168114620011c05760008081fd5b8452948a0194928a01926200119d565b908201528752505050928401928401620010c9565b5090979650505050505050565b600080604083850312156200120657600080fd5b82516001600160401b03808211156200121e57600080fd5b90840190606082870312156200123357600080fd5b6200123d62000fb3565b620012488362001011565b815260206200125981850162001011565b818301526040840151838111156200127057600080fd5b80850194505087601f8501126200128657600080fd5b8351838111156200129b576200129b62000f9d565b620012af601f8201601f1916830162000fde565b8181528983838801011115620012c457600080fd5b620012d5828483018589016200102e565b604084015250860151909450915080821115620012f157600080fd5b5062001300858286016200107a565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162001361576200136162001336565b5060010190565b60008151808452620013828160208601602086016200102e565b601f01601f19169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156200146b57898403607f19018652815180516001600160a01b031685528381015189860190600381106200140757634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b80831015620014555783516001600160e01b031916825292860192600192909201919086019062001429565b50978501979550505090820190600101620013bf565b50506001600160a01b038a169088015286810360408801526200148f818962001368565b9a9950505050505050505050565b81810381811115620014b357620014b362001336565b92915050565b60006001600160601b038281166002600160601b03198101620014e057620014e062001336565b6001019392505050565b60008251620014fe8184602087016200102e565b9190910192915050565b6001600160a01b03831681526040602082018190526000906200152e9083018462001368565b949350505050565b634e487b7160e01b600052603160045260246000fd5b60208152600062001561602083018462001368565b9392505050565b61022b80620015786000396000f3fe60806040526000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0061005360017fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6101b5565b600080357fffffffff000000000000000000000000000000000000000000000000000000001681529116602081905260409091205490925082915073ffffffffffffffffffffffffffffffffffffffff166004361015610114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4469616d6f6e643a2053656c6563746f7220697320746f6f2073686f7274000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374604482015260640161010b565b3660008037600080366000845af43d6000803e8080156101b0573d6000f35b3d6000fd5b818103818111156101ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220f85fc07f2d35b24eaa0af26d3fd7ec2932df0ab65906b6f77e8f44c46edd70c564736f6c634300081300334c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204164642066616365742063616e277420624c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f64654c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000efc0e701a824943b469a694ac564aa1eff7ab7dd00000000000000000000000012fe22572873d18764df0c999b6c998bfab247fb000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000243cfffd39000000000000000000000000efc0e701a824943b469a694ac564aa1eff7ab7dd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000a80000000000000000000000000e17a61e55ccbc3d1e56b6a26ea1d4f8382a40ad9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000009248a9ca3000000000000000000000000000000000000000000000000000000002f2ff15d0000000000000000000000000000000000000000000000000000000091d14854000000000000000000000000000000000000000000000000000000008456cb59000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000008bb9c5bf00000000000000000000000000000000000000000000000000000000d547741f000000000000000000000000000000000000000000000000000000001e4e0091000000000000000000000000000000000000000000000000000000003f4ba83a00000000000000000000000000000000000000000000000000000000000000000000000000000000d3c81bd07948a38546bca894f8bfecb5526137980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000d11b60c336a8416162272475ff9df572e516fc51000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000e9f3299b9443d3d5130771f26b7e18a2a7aa9db0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000291a47c90400000000000000000000000000000000000000000000000000000000421e108c0000000000000000000000000000000000000000000000000000000091df16d300000000000000000000000000000000000000000000000000000000b0bd67b4000000000000000000000000000000000000000000000000000000008b38ebb300000000000000000000000000000000000000000000000000000000ebef28a700000000000000000000000000000000000000000000000000000000017df32700000000000000000000000000000000000000000000000000000000fbff3a4100000000000000000000000000000000000000000000000000000000e0ee685500000000000000000000000000000000000000000000000000000000bc3ea01800000000000000000000000000000000000000000000000000000000a9b8b79600000000000000000000000000000000000000000000000000000000214f788200000000000000000000000000000000000000000000000000000000b42165d000000000000000000000000000000000000000000000000000000000221e2e600000000000000000000000000000000000000000000000000000000033c5aa5700000000000000000000000000000000000000000000000000000000c0030add00000000000000000000000000000000000000000000000000000000dd390ea000000000000000000000000000000000000000000000000000000000ba2d8cdd0000000000000000000000000000000000000000000000000000000093e4e9ee000000000000000000000000000000000000000000000000000000001a867af500000000000000000000000000000000000000000000000000000000f986cd5700000000000000000000000000000000000000000000000000000000f6f172cb0000000000000000000000000000000000000000000000000000000015f9739800000000000000000000000000000000000000000000000000000000e2d443bd00000000000000000000000000000000000000000000000000000000016afee700000000000000000000000000000000000000000000000000000000be1d86e10000000000000000000000000000000000000000000000000000000092324611000000000000000000000000000000000000000000000000000000001f7e8c7e000000000000000000000000000000000000000000000000000000001c1f8aa3000000000000000000000000000000000000000000000000000000000083faee00000000000000000000000000000000000000000000000000000000147f1b96000000000000000000000000000000000000000000000000000000006605bfda00000000000000000000000000000000000000000000000000000000826d5b8b00000000000000000000000000000000000000000000000000000000d3815fb900000000000000000000000000000000000000000000000000000000965cc7ac000000000000000000000000000000000000000000000000000000003535f48b00000000000000000000000000000000000000000000000000000000ad3401ed0000000000000000000000000000000000000000000000000000000036c3df2400000000000000000000000000000000000000000000000000000000c5f956af000000000000000000000000000000000000000000000000000000008fe6368300000000000000000000000000000000000000000000000000000000e8b734240000000000000000000000000000000000000000000000000000000000000000000000000000000058860e93b6fc7a6e4abd0f5d851a88654a34d0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000000000000000000000000000b64f2347752192f51930ad6ad3bea0b3a2074fac0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000202ed4d2d6000000000000000000000000000000000000000000000000000000007efc918f0000000000000000000000000000000000000000000000000000000081f17467000000000000000000000000000000000000000000000000000000009aae55a70000000000000000000000000000000000000000000000000000000082ae27cd00000000000000000000000000000000000000000000000000000000b4eae1cb000000000000000000000000000000000000000000000000000000009c494373000000000000000000000000000000000000000000000000000000009d202bf8000000000000000000000000000000000000000000000000000000009b52b9a80000000000000000000000000000000000000000000000000000000017b2bffa0000000000000000000000000000000000000000000000000000000087dcd5fb000000000000000000000000000000000000000000000000000000005b0bdd8a0000000000000000000000000000000000000000000000000000000092beb04200000000000000000000000000000000000000000000000000000000245cd973000000000000000000000000000000000000000000000000000000002287fe4000000000000000000000000000000000000000000000000000000000c4cb35cf00000000000000000000000000000000000000000000000000000000edecef95000000000000000000000000000000000000000000000000000000007e625a550000000000000000000000000000000000000000000000000000000030bbe58500000000000000000000000000000000000000000000000000000000de858d7c000000000000000000000000000000000000000000000000000000006060663e00000000000000000000000000000000000000000000000000000000a14d1f7800000000000000000000000000000000000000000000000000000000cec10c11000000000000000000000000000000000000000000000000000000009b94607c00000000000000000000000000000000000000000000000000000000ecfd1a9e000000000000000000000000000000000000000000000000000000007853c88800000000000000000000000000000000000000000000000000000000cbd4e7b4000000000000000000000000000000000000000000000000000000008106016300000000000000000000000000000000000000000000000000000000b98c9fe600000000000000000000000000000000000000000000000000000000aeaf4f0400000000000000000000000000000000000000000000000000000000040da68500000000000000000000000000000000000000000000000000000000edc8d27d00000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0061005360017fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6101b5565b600080357fffffffff000000000000000000000000000000000000000000000000000000001681529116602081905260409091205490925082915073ffffffffffffffffffffffffffffffffffffffff166004361015610114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4469616d6f6e643a2053656c6563746f7220697320746f6f2073686f7274000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374604482015260640161010b565b3660008037600080366000845af43d6000803e8080156101b0573d6000f35b3d6000fd5b818103818111156101ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220f85fc07f2d35b24eaa0af26d3fd7ec2932df0ab65906b6f77e8f44c46edd70c564736f6c63430008130033

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

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000efc0e701a824943b469a694ac564aa1eff7ab7dd00000000000000000000000012fe22572873d18764df0c999b6c998bfab247fb000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000243cfffd39000000000000000000000000efc0e701a824943b469a694ac564aa1eff7ab7dd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000a80000000000000000000000000e17a61e55ccbc3d1e56b6a26ea1d4f8382a40ad9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000009248a9ca3000000000000000000000000000000000000000000000000000000002f2ff15d0000000000000000000000000000000000000000000000000000000091d14854000000000000000000000000000000000000000000000000000000008456cb59000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000008bb9c5bf00000000000000000000000000000000000000000000000000000000d547741f000000000000000000000000000000000000000000000000000000001e4e0091000000000000000000000000000000000000000000000000000000003f4ba83a00000000000000000000000000000000000000000000000000000000000000000000000000000000d3c81bd07948a38546bca894f8bfecb5526137980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000d11b60c336a8416162272475ff9df572e516fc51000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000e9f3299b9443d3d5130771f26b7e18a2a7aa9db0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000291a47c90400000000000000000000000000000000000000000000000000000000421e108c0000000000000000000000000000000000000000000000000000000091df16d300000000000000000000000000000000000000000000000000000000b0bd67b4000000000000000000000000000000000000000000000000000000008b38ebb300000000000000000000000000000000000000000000000000000000ebef28a700000000000000000000000000000000000000000000000000000000017df32700000000000000000000000000000000000000000000000000000000fbff3a4100000000000000000000000000000000000000000000000000000000e0ee685500000000000000000000000000000000000000000000000000000000bc3ea01800000000000000000000000000000000000000000000000000000000a9b8b79600000000000000000000000000000000000000000000000000000000214f788200000000000000000000000000000000000000000000000000000000b42165d000000000000000000000000000000000000000000000000000000000221e2e600000000000000000000000000000000000000000000000000000000033c5aa5700000000000000000000000000000000000000000000000000000000c0030add00000000000000000000000000000000000000000000000000000000dd390ea000000000000000000000000000000000000000000000000000000000ba2d8cdd0000000000000000000000000000000000000000000000000000000093e4e9ee000000000000000000000000000000000000000000000000000000001a867af500000000000000000000000000000000000000000000000000000000f986cd5700000000000000000000000000000000000000000000000000000000f6f172cb0000000000000000000000000000000000000000000000000000000015f9739800000000000000000000000000000000000000000000000000000000e2d443bd00000000000000000000000000000000000000000000000000000000016afee700000000000000000000000000000000000000000000000000000000be1d86e10000000000000000000000000000000000000000000000000000000092324611000000000000000000000000000000000000000000000000000000001f7e8c7e000000000000000000000000000000000000000000000000000000001c1f8aa3000000000000000000000000000000000000000000000000000000000083faee00000000000000000000000000000000000000000000000000000000147f1b96000000000000000000000000000000000000000000000000000000006605bfda00000000000000000000000000000000000000000000000000000000826d5b8b00000000000000000000000000000000000000000000000000000000d3815fb900000000000000000000000000000000000000000000000000000000965cc7ac000000000000000000000000000000000000000000000000000000003535f48b00000000000000000000000000000000000000000000000000000000ad3401ed0000000000000000000000000000000000000000000000000000000036c3df2400000000000000000000000000000000000000000000000000000000c5f956af000000000000000000000000000000000000000000000000000000008fe6368300000000000000000000000000000000000000000000000000000000e8b734240000000000000000000000000000000000000000000000000000000000000000000000000000000058860e93b6fc7a6e4abd0f5d851a88654a34d0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000000000000000000000000000b64f2347752192f51930ad6ad3bea0b3a2074fac0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000202ed4d2d6000000000000000000000000000000000000000000000000000000007efc918f0000000000000000000000000000000000000000000000000000000081f17467000000000000000000000000000000000000000000000000000000009aae55a70000000000000000000000000000000000000000000000000000000082ae27cd00000000000000000000000000000000000000000000000000000000b4eae1cb000000000000000000000000000000000000000000000000000000009c494373000000000000000000000000000000000000000000000000000000009d202bf8000000000000000000000000000000000000000000000000000000009b52b9a80000000000000000000000000000000000000000000000000000000017b2bffa0000000000000000000000000000000000000000000000000000000087dcd5fb000000000000000000000000000000000000000000000000000000005b0bdd8a0000000000000000000000000000000000000000000000000000000092beb04200000000000000000000000000000000000000000000000000000000245cd973000000000000000000000000000000000000000000000000000000002287fe4000000000000000000000000000000000000000000000000000000000c4cb35cf00000000000000000000000000000000000000000000000000000000edecef95000000000000000000000000000000000000000000000000000000007e625a550000000000000000000000000000000000000000000000000000000030bbe58500000000000000000000000000000000000000000000000000000000de858d7c000000000000000000000000000000000000000000000000000000006060663e00000000000000000000000000000000000000000000000000000000a14d1f7800000000000000000000000000000000000000000000000000000000cec10c11000000000000000000000000000000000000000000000000000000009b94607c00000000000000000000000000000000000000000000000000000000ecfd1a9e000000000000000000000000000000000000000000000000000000007853c88800000000000000000000000000000000000000000000000000000000cbd4e7b4000000000000000000000000000000000000000000000000000000008106016300000000000000000000000000000000000000000000000000000000b98c9fe600000000000000000000000000000000000000000000000000000000aeaf4f0400000000000000000000000000000000000000000000000000000000040da68500000000000000000000000000000000000000000000000000000000edc8d27d00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _args (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _diamondCutFacets (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
129 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 000000000000000000000000efc0e701a824943b469a694ac564aa1eff7ab7dd
Arg [3] : 00000000000000000000000012fe22572873d18764df0c999b6c998bfab247fb
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [6] : 3cfffd39000000000000000000000000efc0e701a824943b469a694ac564aa1e
Arg [7] : ff7ab7dd00000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000300
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000420
Arg [13] : 00000000000000000000000000000000000000000000000000000000000009c0
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000a80
Arg [15] : 000000000000000000000000e17a61e55ccbc3d1e56b6a26ea1d4f8382a40ad9
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [19] : 248a9ca300000000000000000000000000000000000000000000000000000000
Arg [20] : 2f2ff15d00000000000000000000000000000000000000000000000000000000
Arg [21] : 91d1485400000000000000000000000000000000000000000000000000000000
Arg [22] : 8456cb5900000000000000000000000000000000000000000000000000000000
Arg [23] : 5c975abb00000000000000000000000000000000000000000000000000000000
Arg [24] : 8bb9c5bf00000000000000000000000000000000000000000000000000000000
Arg [25] : d547741f00000000000000000000000000000000000000000000000000000000
Arg [26] : 1e4e009100000000000000000000000000000000000000000000000000000000
Arg [27] : 3f4ba83a00000000000000000000000000000000000000000000000000000000
Arg [28] : 000000000000000000000000d3c81bd07948a38546bca894f8bfecb552613798
Arg [29] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [32] : 1f931c1c00000000000000000000000000000000000000000000000000000000
Arg [33] : 000000000000000000000000d11b60c336a8416162272475ff9df572e516fc51
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [35] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [36] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [37] : cdffacc600000000000000000000000000000000000000000000000000000000
Arg [38] : 52ef6b2c00000000000000000000000000000000000000000000000000000000
Arg [39] : adfca15e00000000000000000000000000000000000000000000000000000000
Arg [40] : 7a0ed62700000000000000000000000000000000000000000000000000000000
Arg [41] : 01ffc9a700000000000000000000000000000000000000000000000000000000
Arg [42] : 0000000000000000000000000e9f3299b9443d3d5130771f26b7e18a2a7aa9db
Arg [43] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [44] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [45] : 0000000000000000000000000000000000000000000000000000000000000029
Arg [46] : 1a47c90400000000000000000000000000000000000000000000000000000000
Arg [47] : 421e108c00000000000000000000000000000000000000000000000000000000
Arg [48] : 91df16d300000000000000000000000000000000000000000000000000000000
Arg [49] : b0bd67b400000000000000000000000000000000000000000000000000000000
Arg [50] : 8b38ebb300000000000000000000000000000000000000000000000000000000
Arg [51] : ebef28a700000000000000000000000000000000000000000000000000000000
Arg [52] : 017df32700000000000000000000000000000000000000000000000000000000
Arg [53] : fbff3a4100000000000000000000000000000000000000000000000000000000
Arg [54] : e0ee685500000000000000000000000000000000000000000000000000000000
Arg [55] : bc3ea01800000000000000000000000000000000000000000000000000000000
Arg [56] : a9b8b79600000000000000000000000000000000000000000000000000000000
Arg [57] : 214f788200000000000000000000000000000000000000000000000000000000
Arg [58] : b42165d000000000000000000000000000000000000000000000000000000000
Arg [59] : 221e2e6000000000000000000000000000000000000000000000000000000000
Arg [60] : 33c5aa5700000000000000000000000000000000000000000000000000000000
Arg [61] : c0030add00000000000000000000000000000000000000000000000000000000
Arg [62] : dd390ea000000000000000000000000000000000000000000000000000000000
Arg [63] : ba2d8cdd00000000000000000000000000000000000000000000000000000000
Arg [64] : 93e4e9ee00000000000000000000000000000000000000000000000000000000
Arg [65] : 1a867af500000000000000000000000000000000000000000000000000000000
Arg [66] : f986cd5700000000000000000000000000000000000000000000000000000000
Arg [67] : f6f172cb00000000000000000000000000000000000000000000000000000000
Arg [68] : 15f9739800000000000000000000000000000000000000000000000000000000
Arg [69] : e2d443bd00000000000000000000000000000000000000000000000000000000
Arg [70] : 016afee700000000000000000000000000000000000000000000000000000000
Arg [71] : be1d86e100000000000000000000000000000000000000000000000000000000
Arg [72] : 9232461100000000000000000000000000000000000000000000000000000000
Arg [73] : 1f7e8c7e00000000000000000000000000000000000000000000000000000000
Arg [74] : 1c1f8aa300000000000000000000000000000000000000000000000000000000
Arg [75] : 0083faee00000000000000000000000000000000000000000000000000000000
Arg [76] : 147f1b9600000000000000000000000000000000000000000000000000000000
Arg [77] : 6605bfda00000000000000000000000000000000000000000000000000000000
Arg [78] : 826d5b8b00000000000000000000000000000000000000000000000000000000
Arg [79] : d3815fb900000000000000000000000000000000000000000000000000000000
Arg [80] : 965cc7ac00000000000000000000000000000000000000000000000000000000
Arg [81] : 3535f48b00000000000000000000000000000000000000000000000000000000
Arg [82] : ad3401ed00000000000000000000000000000000000000000000000000000000
Arg [83] : 36c3df2400000000000000000000000000000000000000000000000000000000
Arg [84] : c5f956af00000000000000000000000000000000000000000000000000000000
Arg [85] : 8fe6368300000000000000000000000000000000000000000000000000000000
Arg [86] : e8b7342400000000000000000000000000000000000000000000000000000000
Arg [87] : 00000000000000000000000058860e93b6fc7a6e4abd0f5d851a88654a34d0c0
Arg [88] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [89] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [90] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [91] : 8da5cb5b00000000000000000000000000000000000000000000000000000000
Arg [92] : f2fde38b00000000000000000000000000000000000000000000000000000000
Arg [93] : 000000000000000000000000b64f2347752192f51930ad6ad3bea0b3a2074fac
Arg [94] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [95] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [96] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [97] : 2ed4d2d600000000000000000000000000000000000000000000000000000000
Arg [98] : 7efc918f00000000000000000000000000000000000000000000000000000000
Arg [99] : 81f1746700000000000000000000000000000000000000000000000000000000
Arg [100] : 9aae55a700000000000000000000000000000000000000000000000000000000
Arg [101] : 82ae27cd00000000000000000000000000000000000000000000000000000000
Arg [102] : b4eae1cb00000000000000000000000000000000000000000000000000000000
Arg [103] : 9c49437300000000000000000000000000000000000000000000000000000000
Arg [104] : 9d202bf800000000000000000000000000000000000000000000000000000000
Arg [105] : 9b52b9a800000000000000000000000000000000000000000000000000000000
Arg [106] : 17b2bffa00000000000000000000000000000000000000000000000000000000
Arg [107] : 87dcd5fb00000000000000000000000000000000000000000000000000000000
Arg [108] : 5b0bdd8a00000000000000000000000000000000000000000000000000000000
Arg [109] : 92beb04200000000000000000000000000000000000000000000000000000000
Arg [110] : 245cd97300000000000000000000000000000000000000000000000000000000
Arg [111] : 2287fe4000000000000000000000000000000000000000000000000000000000
Arg [112] : c4cb35cf00000000000000000000000000000000000000000000000000000000
Arg [113] : edecef9500000000000000000000000000000000000000000000000000000000
Arg [114] : 7e625a5500000000000000000000000000000000000000000000000000000000
Arg [115] : 30bbe58500000000000000000000000000000000000000000000000000000000
Arg [116] : de858d7c00000000000000000000000000000000000000000000000000000000
Arg [117] : 6060663e00000000000000000000000000000000000000000000000000000000
Arg [118] : a14d1f7800000000000000000000000000000000000000000000000000000000
Arg [119] : cec10c1100000000000000000000000000000000000000000000000000000000
Arg [120] : 9b94607c00000000000000000000000000000000000000000000000000000000
Arg [121] : ecfd1a9e00000000000000000000000000000000000000000000000000000000
Arg [122] : 7853c88800000000000000000000000000000000000000000000000000000000
Arg [123] : cbd4e7b400000000000000000000000000000000000000000000000000000000
Arg [124] : 8106016300000000000000000000000000000000000000000000000000000000
Arg [125] : b98c9fe600000000000000000000000000000000000000000000000000000000
Arg [126] : aeaf4f0400000000000000000000000000000000000000000000000000000000
Arg [127] : 040da68500000000000000000000000000000000000000000000000000000000
Arg [128] : edc8d27d00000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.