ETH Price: $3,592.70 (+0.81%)
Gas: 4 Gwei

Contract

0xb1bE0000C6B3C62749b5F0c92480146452D15423
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Advanced Pipe189799352024-01-10 23:51:11157 days ago1704930671IN
0xb1bE0000...452D15423
0 ETH0.003239760
Advanced Pipe187665512023-12-12 0:32:11187 days ago1702341131IN
0xb1bE0000...452D15423
0 ETH0.0022129860
Advanced Pipe187186862023-12-05 7:34:35194 days ago1701761675IN
0xb1bE0000...452D15423
0 ETH0.0023739843.97652157
0x60806040176838562023-07-13 10:01:11339 days ago1689242471IN
 Create: Pipeline
0 ETH0.0226421723.75338257

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
200674662024-06-11 8:42:475 days ago1718095367
0xb1bE0000...452D15423
0.0003332 ETH
200674662024-06-11 8:42:475 days ago1718095367
0xb1bE0000...452D15423
0.0003332 ETH
200521992024-06-09 5:31:477 days ago1717911107
0xb1bE0000...452D15423
7 ETH
200521992024-06-09 5:31:477 days ago1717911107
0xb1bE0000...452D15423
7 ETH
200110442024-06-03 11:37:5913 days ago1717414679
0xb1bE0000...452D15423
0.025 ETH
200110442024-06-03 11:37:5913 days ago1717414679
0xb1bE0000...452D15423
0.025 ETH
199763612024-05-29 15:18:4718 days ago1716995927
0xb1bE0000...452D15423
7 ETH
199763612024-05-29 15:18:4718 days ago1716995927
0xb1bE0000...452D15423
7 ETH
199348002024-05-23 19:54:5923 days ago1716494099
0xb1bE0000...452D15423
10 ETH
199348002024-05-23 19:54:5923 days ago1716494099
0xb1bE0000...452D15423
10 ETH
199342932024-05-23 18:12:4723 days ago1716487967
0xb1bE0000...452D15423
5 ETH
199342932024-05-23 18:12:4723 days ago1716487967
0xb1bE0000...452D15423
5 ETH
199330132024-05-23 13:54:5924 days ago1716472499
0xb1bE0000...452D15423
5 ETH
199330132024-05-23 13:54:5924 days ago1716472499
0xb1bE0000...452D15423
5 ETH
198144812024-05-07 0:00:4740 days ago1715040047
0xb1bE0000...452D15423
3 ETH
198144812024-05-07 0:00:4740 days ago1715040047
0xb1bE0000...452D15423
3 ETH
197701772024-04-30 19:20:5946 days ago1714504859
0xb1bE0000...452D15423
9 ETH
197701772024-04-30 19:20:5946 days ago1714504859
0xb1bE0000...452D15423
9 ETH
197643112024-04-29 23:42:1147 days ago1714434131
0xb1bE0000...452D15423
6 ETH
197643112024-04-29 23:42:1147 days ago1714434131
0xb1bE0000...452D15423
6 ETH
196513272024-04-14 4:14:4763 days ago1713068087
0xb1bE0000...452D15423
33.45 ETH
196513272024-04-14 4:14:4763 days ago1713068087
0xb1bE0000...452D15423
33.45 ETH
196421482024-04-12 21:17:5964 days ago1712956679
0xb1bE0000...452D15423
6.17 ETH
196421482024-04-12 21:17:5964 days ago1712956679
0xb1bE0000...452D15423
6.17 ETH
196417902024-04-12 20:05:2364 days ago1712952323
0xb1bE0000...452D15423
30.99 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Pipeline

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 14 : Pipeline.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma experimental ABIEncoderV2;

import "../interfaces/IPipeline.sol";
import "../libraries/LibFunction.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721Holder.sol";

/**
 * @title Pipeline
 * @author Publius
 * @notice Pipeline creates a sandbox to execute any series of function calls on any series of protocols through Pipe functions.
 * Any assets left in Pipeline between transactions can be transferred out by any account.
 * Users Pipe a series of PipeCalls that each execute a function call to another protocol through Pipeline.
 * https://evmpipeline.org
 **/

contract Pipeline is IPipeline, ERC1155Holder, ERC721Holder {

    /**
     * @dev So Pipeline can receive Ether.
     */
    receive() external payable {}

    /**
     * @dev Returns the current version of Pipeline.
     */
    function version() external pure returns (string memory) {
        return "1.0.1";
    }

    /**
     * @notice Execute a single PipeCall.
     * Supports sending Ether through msg.value
     * @param p PipeCall to execute
     * @return result return value of PipeCall
    **/
    function pipe(PipeCall calldata p)
        external
        payable
        override
        returns (bytes memory result)
    {
        result = _pipe(p.target, p.data, msg.value);
    }
    
    /**
     * @notice Execute a list of executes a list of PipeCalls.
     * @param pipes list of PipeCalls to execute
     * @return results list of return values for each PipeCall
    **/
    function multiPipe(PipeCall[] calldata pipes)
        external
        payable
        override
        returns (bytes[] memory results)
    {
        results = new bytes[](pipes.length);
        for (uint256 i = 0; i < pipes.length; i++) {
            results[i] = _pipe(pipes[i].target, pipes[i].data, 0);
        }
    }

    /**
     * @notice Execute a list of AdvancedPipeCalls.
     * @param pipes list of AdvancedPipeCalls to execute
     * @return results list of return values for each AdvancedPipeCalls
    **/
    function advancedPipe(AdvancedPipeCall[] calldata pipes)
        external
        payable
        override
        returns (bytes[] memory results) {
            results = new bytes[](pipes.length);
            for (uint256 i = 0; i < pipes.length; ++i) {
                results[i] = _advancedPipe(pipes[i], results);
            }
        }

    // Execute function call using calldata
    function _pipe(
        address target,
        bytes calldata data,
        uint256 value
    ) private returns (bytes memory result) {
        bool success;
        (success, result) = target.call{value: value}(data);
        LibFunction.checkReturn(success, result);
    }

    // Execute function call using memory
    function _pipeMem(
        address target,
        bytes memory data,
        uint256 value
    ) private returns (bytes memory result) {
        bool success;
        (success, result) = target.call{value: value}(data);
        LibFunction.checkReturn(success, result);
    }

    // Execute an AdvancedPipeCall
    function _advancedPipe(
        AdvancedPipeCall calldata p,
        bytes[] memory returnData
    ) private returns (bytes memory result) {
        uint256 value = getEthValue(p.clipboard);
        // 0x00 -> Normal pipe: Standard function call
        // else > Advanced pipe: Copy return data into function call through buildAdvancedCalldata
        if (p.clipboard[0] == 0x00) {
            result = _pipe(p.target, p.callData, value);
        } else {
            result = LibFunction.useClipboard(p.callData, p.clipboard, returnData);
            result = _pipeMem(p.target, result, value);
        }
    }

    // Extracts Ether value from a Clipboard
    // clipboard[1] indicates whether there is an Ether value in the advanced data
    // if 0x00 -> No Ether value, return 0
    // else -> return the last 32 bytes of clipboard
    function getEthValue(bytes calldata clipboard) private pure returns (uint256 value) {
        if (clipboard[1] == 0x00) return 0;
        assembly { value := calldataload(sub(add(clipboard.offset, clipboard.length), 32))}
    }
}

File 2 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 3 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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);
}

File 4 of 14 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 5 of 14 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC1155Receiver.sol";
import "../../introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    constructor() internal {
        _registerInterface(
            ERC1155Receiver(address(0)).onERC1155Received.selector ^
            ERC1155Receiver(address(0)).onERC1155BatchReceived.selector
        );
    }
}

File 6 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {

    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external
        returns(bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external
        returns(bytes4);
}

File 7 of 14 : ERC721Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC721Receiver.sol";

  /**
   * @dev Implementation of the {IERC721Receiver} interface.
   *
   * Accepts all token transfers. 
   * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
   */
contract ERC721Holder is IERC721Receiver {

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 8 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}

File 9 of 14 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity =0.7.6;
/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
/******************************************************************************/

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}

File 10 of 14 : IDiamondLoupe.sol
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity =0.7.6;
// A loupe is a small magnifying glass used to look at diamonds.
// These functions look at diamonds
interface IDiamondLoupe {
    /// These functions are expected to be called frequently
    /// by tools.

    struct Facet {
        address facetAddress;
        bytes4[] functionSelectors;
    }

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

    /// @notice Gets all the function selectors supported by a specific facet.
    /// @param _facet The facet address.
    /// @return facetFunctionSelectors_
    function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);

    /// @notice Get all the facet addresses used by a diamond.
    /// @return facetAddresses_
    function facetAddresses() external view returns (address[] memory facetAddresses_);

    /// @notice Gets the facet that supports the given selector.
    /// @dev If facet is not found return address(0).
    /// @param _functionSelector The function selector.
    /// @return facetAddress_ The facet address.
    function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);
}

File 11 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity =0.7.6;
interface IERC165 {
    /// @notice Query if a contract implements an interface
    /// @param interfaceId The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 14 : IPipeline.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma experimental ABIEncoderV2;

/**
 * @title IPipeline
 * @author Publius
 * @notice Pipeline Interface – Pipeline creates a sandbox to execute any series of function calls on any series of protocols through \term{Pipe} functions. 
 * Any assets left in Pipeline between transactions can be transferred out by any account. 
 * Users Pipe a series of PipeCalls that each execute a function call to another protocol through Pipeline. 
 **/

// PipeCalls specify a function call to be executed by Pipeline. 
// Pipeline supports 2 types of PipeCalls: PipeCall and AdvancedPipeCall.

// PipeCall makes a function call with a static target address and callData.
struct PipeCall {
    address target;
    bytes data;
}

// AdvancedPipeCall makes a function call with a static target address and both static and dynamic callData.
// AdvancedPipeCalls support sending Ether in calls.
// [ PipeCall Type | Send Ether Flag | PipeCall Type data | Ether Value (only if flag == 1)]
// [ 1 byte        | 1 byte          | n bytes        | 0 or 32 bytes                      ]
// See LibFunction.useClipboard for more details.
struct AdvancedPipeCall {
    address target;
    bytes callData;
    bytes clipboard;
}

interface IPipeline {

    function pipe(PipeCall calldata p)
        external
        payable
        returns (bytes memory result);

    function multiPipe(PipeCall[] calldata pipes)
        external
        payable
        returns (bytes[] memory results);

    function advancedPipe(AdvancedPipeCall[] calldata pipes)
        external
        payable
        returns (bytes[] memory results);

}

File 13 of 14 : LibDiamond.sol
/*
 SPDX-License-Identifier: MIT
*/

pragma experimental ABIEncoderV2;
pragma solidity =0.7.6;
/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/

import {IDiamondCut} from "../interfaces/IDiamondCut.sol";
import {IDiamondLoupe} from "../interfaces/IDiamondLoupe.sol";
import {IERC165} from "../interfaces/IERC165.sol";

library LibDiamond {
    bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");

    struct FacetAddressAndPosition {
        address facetAddress;
        uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array
    }

    struct FacetFunctionSelectors {
        bytes4[] functionSelectors;
        uint256 facetAddressPosition; // position of facetAddress in facetAddresses array
    }

    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;
    }

    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    function setContractOwner(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        address previousOwner = ds.contractOwner;
        ds.contractOwner = _newOwner;
        emit OwnershipTransferred(previousOwner, _newOwner);
    }

    function contractOwner() internal view returns (address contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner;
    }

    function enforceIsOwnerOrContract() internal view {
        require(msg.sender == diamondStorage().contractOwner ||
                msg.sender == address(this), "LibDiamond: Must be contract or owner"
        );
    }

    function enforceIsContractOwner() internal view {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

    event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);

    function addDiamondFunctions(
        address _diamondCutFacet,
        address _diamondLoupeFacet
    ) internal {
        IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](2);
        bytes4[] memory functionSelectors = new bytes4[](1);
        functionSelectors[0] = IDiamondCut.diamondCut.selector;
        cut[0] = IDiamondCut.FacetCut({facetAddress: _diamondCutFacet, action: IDiamondCut.FacetCutAction.Add, functionSelectors: functionSelectors});
        functionSelectors = new bytes4[](5);
        functionSelectors[0] = IDiamondLoupe.facets.selector;
        functionSelectors[1] = IDiamondLoupe.facetFunctionSelectors.selector;
        functionSelectors[2] = IDiamondLoupe.facetAddresses.selector;
        functionSelectors[3] = IDiamondLoupe.facetAddress.selector;
        functionSelectors[4] = IERC165.supportsInterface.selector;
        cut[1] = IDiamondCut.FacetCut({
            facetAddress: _diamondLoupeFacet,
            action: IDiamondCut.FacetCutAction.Add,
            functionSelectors: functionSelectors
        });
        diamondCut(cut, address(0), "");
    }

    // Internal function version of diamondCut
    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);
    }

    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++;
        }
    }

    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++;
        }
    }

    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);
        }
    }

    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);
    }    


    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;
    }

    function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {        
        require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
        // 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;
        }
    }

    function initializeDiamondCut(address _init, bytes memory _calldata) internal {
        if (_init == address(0)) {
            require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty");
        } else {
            require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)");
            if (_init != address(this)) {
                enforceHasContractCode(_init, "LibDiamondCut: _init address has no code");
            }
            (bool success, bytes memory error) = _init.delegatecall(_calldata);
            if (!success) {
                if (error.length > 0) {
                    // bubble up the error
                    revert(string(error));
                } else {
                    revert("LibDiamondCut: _init function reverted");
                }
            }
        }
    }

    function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}

File 14 of 14 : LibFunction.sol
/*
 SPDX-License-Identifier: MIT
*/

pragma solidity =0.7.6;
pragma experimental ABIEncoderV2;

import {LibDiamond} from "./LibDiamond.sol";

/**
 * @title Lib Function
 * @author Publius
 **/

library LibFunction {
    /**
     * @notice Checks The return value of a any function call for success, if not returns the error returned in `results`
     * @param success Whether the corresponding function call succeeded
     * @param result The return data of the corresponding function call
    **/
    function checkReturn(bool success, bytes memory result) internal pure {
        if (!success) {
            // Next 5 lines from https://ethereum.stackexchange.com/a/83577
            // Also, used in Uniswap V3 https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/Multicall.sol#L17
            if (result.length < 68) revert();
            assembly {
                result := add(result, 0x04)
            }
            revert(abi.decode(result, (string)));
        }
    }

    /**
     * @notice Gets the facet address for a given selector
     * @param selector The function selector to fetch the facet address for
     * @dev Fails if no set facet address
     * @return facet The facet address
    **/
    function facetForSelector(bytes4 selector)
        internal
        view
        returns (address facet)
    {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facet = ds.selectorToFacetAndPosition[selector].facetAddress;
        require(facet != address(0), "Diamond: Function does not exist");
    }

    /** @notice Use a Clipboard on callData to copy return values stored as returnData from any Advanced Calls
     * that have already been executed and paste them into the callData of the next Advanced Call, in a customizable manner
     * @param callData The callData bytes of next Advanced Call to paste onto
     * @param clipboard 0, 1 or n encoded paste operations and encoded ether value if using Pipeline
     * -------------------------------------------------------------------------------------
     * Clipboard stores the bytes:
     * [ Type   | Use Ether Flag*  | Type data      | Ether Value (only if flag == 1)*]
     * [ 1 byte | 1 byte           | n bytes        | 0 or 32 bytes                   ]
     * * Use Ether Flag and Ether Value are processed in Pipeline.sol (Not used in Farm). See Pipeline.getEthValue for ussage.
     * Type: 0x00, 0x01 or 0x002
     *  - 0x00: 0 Paste Operations (Logic in Pipeline.sol and FarmFacet.sol)
     *  - 0x01: 1 Paste Operation
     *  - 0x02: n Paste Operations
     * Type Data: There are two types with type data: 0x01, 0x02
     *  Type 1 (0x01): Copy 1 bytes32 from a previous function return value
     *       [ pasteParams ]
     *       [ 32 bytes ]
     *      Note: Should be encoded with ['bytes2', 'uint80', 'uint80', 'uint80']  where the first two bytes are Type and Send Ether Flag if using Pipeline
     *  Type 2 (0x02): Copy n bytes32 from a previous function return value
     *       [ Padding      | pasteParams[] ]
     *       [ 32 bytes     | 32 + 32 * n   ]
     *        * The first 32 bytes are the length of the array.
     * -------------------------------------------------------------------------------------
     * @param returnData A list of return values from previously executed Advanced Calls
     @return data The function call return datas
    **/
    function useClipboard(
        bytes calldata callData,
        bytes calldata clipboard,
        bytes[] memory returnData
    ) internal pure returns (bytes memory data) {
        bytes1 typeId = clipboard[0];
        if (typeId == 0x01) {
            bytes32 pasteParams = abi.decode(clipboard, (bytes32));
            data = LibFunction.pasteAdvancedBytes(callData, returnData, pasteParams);
        } else if (typeId == 0x02) {
            (, bytes32[] memory pasteParams) = abi.decode(
                clipboard,
                (uint256, bytes32[])
            );
            data = callData;
            for (uint256 i; i < pasteParams.length; i++)
                data = LibFunction.pasteAdvancedBytes(data, returnData, pasteParams[i]);
        } else {
            revert("Function: Advanced Type not supported");
        }
    }

    /**
     * @notice Copies 32 bytes from returnData into callData determined by pasteParams
     * @param callData The callData bytes of the next function call
     * @param returnData A list of bytes corresponding to return data from previous function calls in the transaction
     * @param pasteParams Denotes which data should be copied and where it should be pasted
     * Should be in the following format
     * [2 bytes | 10 bytes         | 10 bytes  | 10 bytes   ]
     * [ N/A    | returnDataIndex  | copyIndex | pasteIndex ]
     * @return pastedData the calldata for the next function call with bytes pasted from returnData
     **/
    function pasteAdvancedBytes(
        bytes memory callData,
        bytes[] memory returnData,
        bytes32 pasteParams
    ) internal pure returns (bytes memory pastedData) {
        // Shift `pasteParams` right 22 bytes to insolated reduceDataIndex
        bytes memory copyData = returnData[uint256((pasteParams << 16) >> 176)];
        pastedData = paste32Bytes(
            copyData,
            callData,
            uint256((pasteParams << 96) >> 176), // Isolate copyIndex
            uint256((pasteParams << 176) >> 176) // Isolate pasteIndex
        );
    }

    /**
     * @notice Copy 32 Bytes from copyData at copyIndex and paste into pasteData at pasteIndex
     * @param copyData The data bytes to copy from
     * @param pasteData The data bytes to paste into
     * @param copyIndex The index in copyData to copying from
     * @param pasteIndex The index in pasteData to paste into
     * @return pastedData The data with the copied with 32 bytes
    **/
    function paste32Bytes(
        bytes memory copyData,
        bytes memory pasteData,
        uint256 copyIndex,
        uint256 pasteIndex
    ) internal pure returns (bytes memory pastedData) {
        assembly {
            mstore(add(pasteData, pasteIndex), mload(add(copyData, copyIndex)))
        }
        pastedData = pasteData;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"clipboard","type":"bytes"}],"internalType":"struct AdvancedPipeCall[]","name":"pipes","type":"tuple[]"}],"name":"advancedPipe","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct PipeCall[]","name":"pipes","type":"tuple[]"}],"name":"multiPipe","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct PipeCall","name":"p","type":"tuple"}],"name":"pipe","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506100216301ffc9a760e01b610036565b610031630271189760e51b610036565b6100ba565b6001600160e01b03198082161415610095576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b610f7b806100c96000396000f3fe60806040526004361061007f5760003560e01c806354fd4d501161004e57806354fd4d501461012e578063bc197c8114610143578063cabec62b14610163578063f23a6e611461017657610086565b806301ffc9a71461008b57806308e1a0ab146100c1578063150b7a02146100e15780631c0a0d5e1461010e57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a6366004610b64565b610196565b6040516100b89190610d9a565b60405180910390f35b6100d46100cf366004610c0e565b6101d1565b6040516100b89190610dd2565b3480156100ed57600080fd5b506101016100fc366004610a43565b6101fc565b6040516100b89190610da5565b61012161011c366004610b0c565b610225565b6040516100b89190610d3a565b34801561013a57600080fd5b506100d46102cd565b34801561014f57600080fd5b5061010161015e36600461099d565b610304565b610121610171366004610b0c565b61032e565b34801561018257600080fd5b50610101610191366004610aa9565b61040a565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60606101f66101e3602084018461097c565b6101f06020850185610e42565b34610434565b92915050565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b60608167ffffffffffffffff8111801561023e57600080fd5b5060405190808252806020026020018201604052801561027257816020015b606081526020019060019003908161025d5790505b50905060005b828110156102c6576102a784848381811061028f57fe5b90506020028101906102a19190610e87565b836104ba565b8282815181106102b357fe5b6020908102919091010152600101610278565b5092915050565b60408051808201909152600581527f312e302e31000000000000000000000000000000000000000000000000000000602082015290565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b60608167ffffffffffffffff8111801561034757600080fd5b5060405190808252806020026020018201604052801561037b57816020015b60608152602001906001900390816103665790505b50905060005b828110156102c6576103eb84848381811061039857fe5b90506020028101906103aa9190610e9c565b6103b890602081019061097c565b8585848181106103c457fe5b90506020028101906103d69190610e9c565b6103e4906020810190610e42565b6000610434565b8282815181106103f757fe5b6020908102919091010152600101610381565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b606060008573ffffffffffffffffffffffffffffffffffffffff16838686604051610460929190610d0e565b60006040518083038185875af1925050503d806000811461049d576040519150601f19603f3d011682016040523d82523d6000602084013e6104a2565b606091505b50925090506104b18183610571565b50949350505050565b606060006104d36104ce6040860186610e42565b6105c5565b90506104e26040850185610e42565b60008181106104ed57fe5b909101356001600160f81b0319161515905061052d57610526610513602086018661097c565b6105206020870187610e42565b84610434565b91506102c6565b61055061053d6020860186610e42565b61054a6040880188610e42565b876105fc565b9150610569610562602086018661097c565b8383610777565b949350505050565b816105c15760448151101561058557600080fd5b6004810190508080602001905181019061059f9190610ba4565b60405162461bcd60e51b81526004016105b89190610dd2565b60405180910390fd5b5050565b6000828260018181106105d457fe5b909101356001600160f81b031916151590506105f2575060006101f6565b5001601f19013590565b606060008484600081811061060d57fe5b909101356001600160f81b0319169150507f01000000000000000000000000000000000000000000000000000000000000008114156106a157600061065485870187610b4c565b905061069988888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508591506107fa9050565b92505061076d565b7f02000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821614156107555760006106e185870187610c46565b91505087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509396505050505b815181101561074e57610744848684848151811061073757fe5b60200260200101516107fa565b935060010161071d565b505061076d565b60405162461bcd60e51b81526004016105b890610de5565b5095945050505050565b606060008473ffffffffffffffffffffffffffffffffffffffff1683856040516107a19190610d1e565b60006040518083038185875af1925050503d80600081146107de576040519150601f19603f3d011682016040523d82523d6000602084013e6107e3565b606091505b50925090506107f28183610571565b509392505050565b606060008360b0601085901b901c60001c8151811061081557fe5b60209081029190910101519050610841818669ffffffffffffffffffff605087901c811690871661084a565b95945050505050565b9201519181019190915290565b803573ffffffffffffffffffffffffffffffffffffffff811681146101cc57600080fd5b60008083601f84011261088c578182fd5b50813567ffffffffffffffff8111156108a3578182fd5b60208301915083602080830285010111156108bd57600080fd5b9250929050565b600082601f8301126108d4578081fd5b813560206108e96108e483610ed5565b610eb1565b8281528181019085830183850287018401881015610905578586fd5b855b8581101561092357813584529284019290840190600101610907565b5090979650505050505050565b600082601f830112610940578081fd5b813561094e6108e482610ef3565b818152846020838601011115610962578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561098d578081fd5b61099682610857565b9392505050565b600080600080600060a086880312156109b4578081fd5b6109bd86610857565b94506109cb60208701610857565b9350604086013567ffffffffffffffff808211156109e7578283fd5b6109f389838a016108c4565b94506060880135915080821115610a08578283fd5b610a1489838a016108c4565b93506080880135915080821115610a29578283fd5b50610a3688828901610930565b9150509295509295909350565b60008060008060808587031215610a58578384fd5b610a6185610857565b9350610a6f60208601610857565b925060408501359150606085013567ffffffffffffffff811115610a91578182fd5b610a9d87828801610930565b91505092959194509250565b600080600080600060a08688031215610ac0578081fd5b610ac986610857565b9450610ad760208701610857565b93506040860135925060608601359150608086013567ffffffffffffffff811115610b00578182fd5b610a3688828901610930565b60008060208385031215610b1e578182fd5b823567ffffffffffffffff811115610b34578283fd5b610b408582860161087b565b90969095509350505050565b600060208284031215610b5d578081fd5b5035919050565b600060208284031215610b75578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610996578182fd5b600060208284031215610bb5578081fd5b815167ffffffffffffffff811115610bcb578182fd5b8201601f81018413610bdb578182fd5b8051610be96108e482610ef3565b818152856020838501011115610bfd578384fd5b610841826020830160208601610f15565b600060208284031215610c1f578081fd5b813567ffffffffffffffff811115610c35578182fd5b820160408185031215610996578182fd5b60008060408385031215610c58578182fd5b8235915060208084013567ffffffffffffffff811115610c76578283fd5b8401601f81018613610c86578283fd5b8035610c946108e482610ed5565b81815283810190838501858402850186018a1015610cb0578687fd5b8694505b83851015610cd2578035835260019490940193918501918501610cb4565b5080955050505050509250929050565b60008151808452610cfa816020860160208601610f15565b601f01601f19169290920160200192915050565b6000828483379101908152919050565b60008251610d30818460208701610f15565b9190910192915050565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015610d8d57603f19888603018452610d7b858351610ce2565b94509285019290850190600101610d5f565b5092979650505050505050565b901515815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6000602082526109966020830184610ce2565b60208082526025908201527f46756e6374696f6e3a20416476616e6365642054797065206e6f74207375707060408201527f6f72746564000000000000000000000000000000000000000000000000000000606082015260800190565b6000808335601e19843603018112610e58578283fd5b83018035915067ffffffffffffffff821115610e72578283fd5b6020019150368190038213156108bd57600080fd5b60008235605e19833603018112610d30578182fd5b60008235603e19833603018112610d30578182fd5b60405181810167ffffffffffffffff81118282101715610ecd57fe5b604052919050565b600067ffffffffffffffff821115610ee957fe5b5060209081020190565b600067ffffffffffffffff821115610f0757fe5b50601f01601f191660200190565b60005b83811015610f30578181015183820152602001610f18565b83811115610f3f576000848401525b5050505056fea26469706673582212202b7c0d9ae318e6cee54b6eb03acfbc37d7c779477c78ed9676c2bb261f9484b964736f6c63430007060033

Deployed Bytecode

0x60806040526004361061007f5760003560e01c806354fd4d501161004e57806354fd4d501461012e578063bc197c8114610143578063cabec62b14610163578063f23a6e611461017657610086565b806301ffc9a71461008b57806308e1a0ab146100c1578063150b7a02146100e15780631c0a0d5e1461010e57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a6366004610b64565b610196565b6040516100b89190610d9a565b60405180910390f35b6100d46100cf366004610c0e565b6101d1565b6040516100b89190610dd2565b3480156100ed57600080fd5b506101016100fc366004610a43565b6101fc565b6040516100b89190610da5565b61012161011c366004610b0c565b610225565b6040516100b89190610d3a565b34801561013a57600080fd5b506100d46102cd565b34801561014f57600080fd5b5061010161015e36600461099d565b610304565b610121610171366004610b0c565b61032e565b34801561018257600080fd5b50610101610191366004610aa9565b61040a565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60606101f66101e3602084018461097c565b6101f06020850185610e42565b34610434565b92915050565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b60608167ffffffffffffffff8111801561023e57600080fd5b5060405190808252806020026020018201604052801561027257816020015b606081526020019060019003908161025d5790505b50905060005b828110156102c6576102a784848381811061028f57fe5b90506020028101906102a19190610e87565b836104ba565b8282815181106102b357fe5b6020908102919091010152600101610278565b5092915050565b60408051808201909152600581527f312e302e31000000000000000000000000000000000000000000000000000000602082015290565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b60608167ffffffffffffffff8111801561034757600080fd5b5060405190808252806020026020018201604052801561037b57816020015b60608152602001906001900390816103665790505b50905060005b828110156102c6576103eb84848381811061039857fe5b90506020028101906103aa9190610e9c565b6103b890602081019061097c565b8585848181106103c457fe5b90506020028101906103d69190610e9c565b6103e4906020810190610e42565b6000610434565b8282815181106103f757fe5b6020908102919091010152600101610381565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b606060008573ffffffffffffffffffffffffffffffffffffffff16838686604051610460929190610d0e565b60006040518083038185875af1925050503d806000811461049d576040519150601f19603f3d011682016040523d82523d6000602084013e6104a2565b606091505b50925090506104b18183610571565b50949350505050565b606060006104d36104ce6040860186610e42565b6105c5565b90506104e26040850185610e42565b60008181106104ed57fe5b909101356001600160f81b0319161515905061052d57610526610513602086018661097c565b6105206020870187610e42565b84610434565b91506102c6565b61055061053d6020860186610e42565b61054a6040880188610e42565b876105fc565b9150610569610562602086018661097c565b8383610777565b949350505050565b816105c15760448151101561058557600080fd5b6004810190508080602001905181019061059f9190610ba4565b60405162461bcd60e51b81526004016105b89190610dd2565b60405180910390fd5b5050565b6000828260018181106105d457fe5b909101356001600160f81b031916151590506105f2575060006101f6565b5001601f19013590565b606060008484600081811061060d57fe5b909101356001600160f81b0319169150507f01000000000000000000000000000000000000000000000000000000000000008114156106a157600061065485870187610b4c565b905061069988888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508591506107fa9050565b92505061076d565b7f02000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821614156107555760006106e185870187610c46565b91505087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509396505050505b815181101561074e57610744848684848151811061073757fe5b60200260200101516107fa565b935060010161071d565b505061076d565b60405162461bcd60e51b81526004016105b890610de5565b5095945050505050565b606060008473ffffffffffffffffffffffffffffffffffffffff1683856040516107a19190610d1e565b60006040518083038185875af1925050503d80600081146107de576040519150601f19603f3d011682016040523d82523d6000602084013e6107e3565b606091505b50925090506107f28183610571565b509392505050565b606060008360b0601085901b901c60001c8151811061081557fe5b60209081029190910101519050610841818669ffffffffffffffffffff605087901c811690871661084a565b95945050505050565b9201519181019190915290565b803573ffffffffffffffffffffffffffffffffffffffff811681146101cc57600080fd5b60008083601f84011261088c578182fd5b50813567ffffffffffffffff8111156108a3578182fd5b60208301915083602080830285010111156108bd57600080fd5b9250929050565b600082601f8301126108d4578081fd5b813560206108e96108e483610ed5565b610eb1565b8281528181019085830183850287018401881015610905578586fd5b855b8581101561092357813584529284019290840190600101610907565b5090979650505050505050565b600082601f830112610940578081fd5b813561094e6108e482610ef3565b818152846020838601011115610962578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561098d578081fd5b61099682610857565b9392505050565b600080600080600060a086880312156109b4578081fd5b6109bd86610857565b94506109cb60208701610857565b9350604086013567ffffffffffffffff808211156109e7578283fd5b6109f389838a016108c4565b94506060880135915080821115610a08578283fd5b610a1489838a016108c4565b93506080880135915080821115610a29578283fd5b50610a3688828901610930565b9150509295509295909350565b60008060008060808587031215610a58578384fd5b610a6185610857565b9350610a6f60208601610857565b925060408501359150606085013567ffffffffffffffff811115610a91578182fd5b610a9d87828801610930565b91505092959194509250565b600080600080600060a08688031215610ac0578081fd5b610ac986610857565b9450610ad760208701610857565b93506040860135925060608601359150608086013567ffffffffffffffff811115610b00578182fd5b610a3688828901610930565b60008060208385031215610b1e578182fd5b823567ffffffffffffffff811115610b34578283fd5b610b408582860161087b565b90969095509350505050565b600060208284031215610b5d578081fd5b5035919050565b600060208284031215610b75578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610996578182fd5b600060208284031215610bb5578081fd5b815167ffffffffffffffff811115610bcb578182fd5b8201601f81018413610bdb578182fd5b8051610be96108e482610ef3565b818152856020838501011115610bfd578384fd5b610841826020830160208601610f15565b600060208284031215610c1f578081fd5b813567ffffffffffffffff811115610c35578182fd5b820160408185031215610996578182fd5b60008060408385031215610c58578182fd5b8235915060208084013567ffffffffffffffff811115610c76578283fd5b8401601f81018613610c86578283fd5b8035610c946108e482610ed5565b81815283810190838501858402850186018a1015610cb0578687fd5b8694505b83851015610cd2578035835260019490940193918501918501610cb4565b5080955050505050509250929050565b60008151808452610cfa816020860160208601610f15565b601f01601f19169290920160200192915050565b6000828483379101908152919050565b60008251610d30818460208701610f15565b9190910192915050565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015610d8d57603f19888603018452610d7b858351610ce2565b94509285019290850190600101610d5f565b5092979650505050505050565b901515815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6000602082526109966020830184610ce2565b60208082526025908201527f46756e6374696f6e3a20416476616e6365642054797065206e6f74207375707060408201527f6f72746564000000000000000000000000000000000000000000000000000000606082015260800190565b6000808335601e19843603018112610e58578283fd5b83018035915067ffffffffffffffff821115610e72578283fd5b6020019150368190038213156108bd57600080fd5b60008235605e19833603018112610d30578182fd5b60008235603e19833603018112610d30578182fd5b60405181810167ffffffffffffffff81118282101715610ecd57fe5b604052919050565b600067ffffffffffffffff821115610ee957fe5b5060209081020190565b600067ffffffffffffffff821115610f0757fe5b50601f01601f191660200190565b60005b83811015610f30578181015183820152602001610f18565b83811115610f3f576000848401525b5050505056fea26469706673582212202b7c0d9ae318e6cee54b6eb03acfbc37d7c779477c78ed9676c2bb261f9484b964736f6c63430007060033

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  ]
[ 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.