Holesky Testnet

Contract

0xd28FA6F955f04B0828E977790e015370E65359DE

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Deposit Unchecke...31494672025-01-15 9:33:483 days ago1736933628IN
0xd28FA6F9...0E65359DE
0 ETH0.000108081.44963356
Deposit Unchecke...31494382025-01-15 9:27:483 days ago1736933268IN
0xd28FA6F9...0E65359DE
0 ETH0.000168491.8382021
Deposit Unchecke...31467402025-01-14 23:35:484 days ago1736897748IN
0xd28FA6F9...0E65359DE
0 ETH0.000004510.04925547
Deposit Unchecke...31355482025-01-13 7:46:485 days ago1736754408IN
0xd28FA6F9...0E65359DE
0 ETH0.000000740.01000001
Deposit Unchecke...31354682025-01-13 7:29:365 days ago1736753376IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31346242025-01-13 4:32:126 days ago1736742732IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31342692025-01-13 3:16:006 days ago1736738160IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31341782025-01-13 2:56:126 days ago1736736972IN
0xd28FA6F9...0E65359DE
0 ETH0.000000740.01000001
Deposit Unchecke...31340902025-01-13 2:37:486 days ago1736735868IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31257682025-01-11 21:11:127 days ago1736629872IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31159752025-01-10 10:15:008 days ago1736504100IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000002
Deposit Unchecke...31141932025-01-10 3:55:489 days ago1736481348IN
0xd28FA6F9...0E65359DE
0 ETH0.000000740.01000001
Deposit Unchecke...31141722025-01-10 3:51:369 days ago1736481096IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
Deposit Unchecke...31106762025-01-09 15:29:489 days ago1736436588IN
0xd28FA6F9...0E65359DE
0 ETH0.000001070.0117373
Deposit Unchecke...31071222025-01-09 2:54:4810 days ago1736391288IN
0xd28FA6F9...0E65359DE
0 ETH0.000000740.01000001
Deposit Unchecke...31071002025-01-09 2:50:0010 days ago1736391000IN
0xd28FA6F9...0E65359DE
0 ETH0.000000910.01000001
0xaf96e7c931054782025-01-08 21:00:4810 days ago1736370048IN
0xd28FA6F9...0E65359DE
0 ETH0.000000080.0010002
0xaf96e7c931054752025-01-08 21:00:0010 days ago1736370000IN
0xd28FA6F9...0E65359DE
0 ETH0.000000080.00100023
0xdd16381031054752025-01-08 21:00:0010 days ago1736370000IN
0xd28FA6F9...0E65359DE
0 ETH0.000000190.00100023
0xdd16381031054732025-01-08 20:59:3610 days ago1736369976IN
0xd28FA6F9...0E65359DE
0 ETH0.000000190.00100024
0xaf96e7c931054612025-01-08 20:57:0010 days ago1736369820IN
0xd28FA6F9...0E65359DE
0 ETH0.000000080.00100023
0xaf96e7c931054602025-01-08 20:56:3610 days ago1736369796IN
0xd28FA6F9...0E65359DE
0 ETH0.000000080.00100027
0xdd16381031054592025-01-08 20:56:2410 days ago1736369784IN
0xd28FA6F9...0E65359DE
0 ETH0.000000190.0010003
0xaf96e7c931054582025-01-08 20:56:1210 days ago1736369772IN
0xd28FA6F9...0E65359DE
0 ETH0.000000080.00100028
0xdd16381031054572025-01-08 20:55:4810 days ago1736369748IN
0xd28FA6F9...0E65359DE
0 ETH0.000000190.00100026
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xFd4a6B7a...b9655A19f
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
MultiFacetProxy

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 6 : MultiFacetProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MultiFacetProxyStorage} from "src/proxy/libraries/MultiFacetProxyStorage.sol";

import {MultiFacetProxyLib} from "src/proxy/libraries/MultiFacetProxyLib.sol";
import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol";

/// @notice This proxy maintains a mapping of function selectors to their respective implementations.
///         The fallback is modified to forward delegate calls based on this mapping.
contract MultiFacetProxy is Proxy {
    error FunctionNotFound(bytes4 selector);

    /// @notice Populates the MultiFacetProxy with the given selector mappings and optionally calls an init function
    /// @param selectorMappings Array of SelectorMapping structs
    /// @param init If non-zero, this address will be delegate called with initData on construction
    /// @param initData The calldata for the delegate call to init
    constructor(MultiFacetProxyLib.SelectorMapping[] memory selectorMappings, address init, bytes memory initData)
        payable
    {
        MultiFacetProxyLib.addFunctions(selectorMappings);

        // Discards return data
        if (init != address(0)) MultiFacetProxyLib.delegateCall(init, initData);
    }

    function _fallback() internal virtual override {
        address facet = _implementation();
        if (facet == address(0)) {
            revert FunctionNotFound(msg.sig);
        }
        _delegate(facet);
    }

    function _implementation() internal view virtual override returns (address) {
        return MultiFacetProxyStorage.layout().selectorToFacet[msg.sig];
    }

    receive() external payable {}
}

File 2 of 6 : MultiFacetProxyStorage.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

/// @notice Storage layout for the MultiFacetProxy following ERC-7201
library MultiFacetProxyStorage {
    string internal constant MULTI_FACET_PROXY_STORAGE_ID = "multi.facet.proxy.storage";
    bytes32 internal constant MULTI_FACET_PROXY_STORAGE_POSITION = keccak256(
        abi.encode(uint256(keccak256(abi.encodePacked(MULTI_FACET_PROXY_STORAGE_ID))) - 1)
    ) & ~bytes32(uint256(0xff));

    /// @custom:storage-location erc7201:multi.facet.proxy.storage
    struct Layout {
        mapping(bytes4 => address) selectorToFacet; // Maps function selectors to their respective facets
        EnumerableSet.Bytes32Set selectors; // Keeps track of all registered selectors
        mapping(address => bool) initialized; // Optional mapping for usage by initialization contracts
    }

    function layout() internal pure returns (Layout storage ps) {
        bytes32 position = MULTI_FACET_PROXY_STORAGE_POSITION;
        assembly {
            ps.slot := position
        }
    }
}

File 3 of 6 : MultiFacetProxyLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {MultiFacetProxyStorage as S} from "src/proxy/libraries/MultiFacetProxyStorage.sol";

import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";

library MultiFacetProxyLib {
    using EnumerableSet for EnumerableSet.Bytes32Set;

    event FunctionSelectorSet(address facet, bytes4 selector);

    error AlreadyInitialized(address init);

    struct SelectorMapping {
        address facet;
        bytes4[] selectors;
    }

    function addFunctions(SelectorMapping[] memory selectorMappings) internal {
        for (uint256 i; i < selectorMappings.length; i++) {
            for (uint256 j; j < selectorMappings[i].selectors.length; j++) {
                addFunction(selectorMappings[i].facet, selectorMappings[i].selectors[j]);
            }
        }
    }

    function replaceFunctions(SelectorMapping[] memory selectorMappings) internal {
        for (uint256 i; i < selectorMappings.length; i++) {
            for (uint256 j; j < selectorMappings[i].selectors.length; j++) {
                replaceFunction(selectorMappings[i].facet, selectorMappings[i].selectors[j]);
            }
        }
    }

    function removeFunctions(bytes4[] memory selectors) internal {
        for (uint256 i; i < selectors.length; i++) {
            removeFunction(selectors[i]);
        }
    }

    // Using string errors here since we don't need gas efficiency for any upgrade facet and this can be decoded without the ABI.
    function addFunction(address facet, bytes4 selector) internal {
        require(
            !S.layout().selectors.contains(bytes32(selector)),
            "MultiFacetProxyLib: selector to add is already registered"
        );
        setFunction(facet, selector);
    }

    function removeFunction(bytes4 selector) internal {
        require(
            S.layout().selectors.contains(bytes32(selector)), "MultiFacetProxyLib: selector to remove is not registered"
        );
        setFunction(address(0), selector);
    }

    function replaceFunction(address facet, bytes4 selector) internal {
        require(
            S.layout().selectors.contains(bytes32(selector)),
            "MultiFacetProxyLib: selector to replace is not registered"
        );
        setFunction(facet, selector);
    }

    function delegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return Address.functionDelegateCall(target, data);
    }

    /// @notice Sets a function selector to a facet address, and adds/removes from the full selector set depending on if the facet address is zero.
    function setFunction(address facet, bytes4 selector) internal {
        S.Layout storage ps = S.layout();

        if (facet == address(0)) {
            ps.selectors.remove(bytes32(selector));
        } else {
            ps.selectors.add(bytes32(selector));
        }
        ps.selectorToFacet[selector] = facet;
        emit FunctionSelectorSet(facet, selector);
    }
}

File 4 of 6 : Proxy.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)

pragma solidity ^0.8.20;

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev This is a virtual function that should be overridden so it returns the address to which the fallback
     * function and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback() external payable virtual {
        _fallback();
    }
}

File 5 of 6 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 6 of 6 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

Settings
{
  "remappings": [
    "@openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "@sp1-contracts/=lib/sp1-contracts/",
    "sp1-verifier/=lib/sp1-contracts/contracts/src/v1.1.0/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "sp1-contracts/=lib/sp1-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"facet","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct MultiFacetProxyLib.SelectorMapping[]","name":"selectorMappings","type":"tuple[]"},{"internalType":"address","name":"init","type":"address"},{"internalType":"bytes","name":"initData","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"FunctionNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"facet","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"FunctionSelectorSet","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x60806040523661000b57005b610013610015565b005b600061001f610066565b90506001600160a01b03811661005a57604051630a82dd7360e31b81526001600160e01b031960003516600482015260240160405180910390fd5b61006381610099565b50565b60006100706100bd565b600080356001600160e01b031916815260209190915260409020546001600160a01b0316919050565b3660008037600080366000845af43d6000803e8080156100b8573d6000f35b3d6000fd5b60008060ff60001b1960016040518060400160405280601981526020017f6d756c74692e66616365742e70726f78792e73746f726167650000000000000081525060405160200161010e9190610162565b6040516020818303038152906040528051906020012060001c6101319190610191565b60405160200161014391815260200190565b60408051601f1981840301815291905280516020909101201692915050565b6000825160005b818110156101835760208186018101518583015201610169565b506000920191825250919050565b818103818111156101b257634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220bebd4d0a1ea6706b99e2a1ee91c1c0f6fbe5c70c6f5825b7035ffae07dc06e2c64736f6c634300081a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.