MOVR Price: $22.09 (+3.29%)
Gas: 3 GWei

Contract

0x485C8Ffe2535B132847F385DB066e8ba946768Ca

Overview

MOVR Balance

Moonriver Chain LogoMoonriver Chain LogoMoonriver Chain Logo0 MOVR

MOVR Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
23949872022-08-17 11:17:48590 days ago1660735068
0x485C8Ffe...a946768Ca
0.01056169 MOVR
23938432022-08-17 6:37:00590 days ago1660718220
0x485C8Ffe...a946768Ca
2.14033165 MOVR
23873302022-08-16 3:25:36591 days ago1660620336
0x485C8Ffe...a946768Ca
0.06109879 MOVR
23848492022-08-15 16:57:06591 days ago1660582626
0x485C8Ffe...a946768Ca
2.6391922 MOVR
23550852022-08-10 16:03:42596 days ago1660147422
0x485C8Ffe...a946768Ca
13.12298 MOVR
23538862022-08-10 11:18:00597 days ago1660130280
0x485C8Ffe...a946768Ca
1.8 MOVR
23430462022-08-08 15:25:18598 days ago1659972318
0x485C8Ffe...a946768Ca
1.84543915 MOVR
23331982022-08-06 22:42:48600 days ago1659825768
0x485C8Ffe...a946768Ca
7.82 MOVR
23224722022-08-05 1:17:48602 days ago1659662268
0x485C8Ffe...a946768Ca
0.52798675 MOVR
23195182022-08-04 12:39:24602 days ago1659616764
0x485C8Ffe...a946768Ca
0.042 MOVR
23195042022-08-04 12:35:12602 days ago1659616512
0x485C8Ffe...a946768Ca
0.03 MOVR
23189822022-08-04 10:22:18603 days ago1659608538
0x485C8Ffe...a946768Ca
3.9 MOVR
23146882022-08-03 15:57:24603 days ago1659542244
0x485C8Ffe...a946768Ca
1.92157814 MOVR
23140052022-08-03 13:02:54603 days ago1659531774
0x485C8Ffe...a946768Ca
0.64175536 MOVR
23040402022-08-01 17:30:48605 days ago1659375048
0x485C8Ffe...a946768Ca
1.66588104 MOVR
23038222022-08-01 16:35:54605 days ago1659371754
0x485C8Ffe...a946768Ca
0.05996293 MOVR
23019542022-08-01 8:29:48606 days ago1659342588
0x485C8Ffe...a946768Ca
0.29652784 MOVR
22972432022-07-31 12:09:42606 days ago1659269382
0x485C8Ffe...a946768Ca
32.14629486 MOVR
22794882022-07-28 7:49:36610 days ago1658994576
0x485C8Ffe...a946768Ca
4.2 MOVR
22713542022-07-26 20:56:42611 days ago1658869002
0x485C8Ffe...a946768Ca
1 MOVR
22697032022-07-26 13:51:18611 days ago1658843478
0x485C8Ffe...a946768Ca
3.55385796 MOVR
22695112022-07-26 13:00:18611 days ago1658840418
0x485C8Ffe...a946768Ca
17.39862989 MOVR
22640562022-07-25 14:55:42612 days ago1658760942
0x485C8Ffe...a946768Ca
4.483265 MOVR
22637452022-07-25 13:43:12612 days ago1658756592
0x485C8Ffe...a946768Ca
2.24512841 MOVR
22637082022-07-25 13:35:18612 days ago1658756118
0x485C8Ffe...a946768Ca
2.22554436 MOVR
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NXTPFacet

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : NXTPFacet.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import { ITransactionManager } from "../Interfaces/ITransactionManager.sol";
import { ILiFi } from "../Interfaces/ILiFi.sol";
import { LibAsset, IERC20 } from "../Libraries/LibAsset.sol";
import { LibDiamond } from "../Libraries/LibDiamond.sol";
import { ReentrancyGuard } from "../Helpers/ReentrancyGuard.sol";
import { InvalidAmount, NativeValueWithERC, NoSwapDataProvided, InvalidConfig } from "../Errors/GenericErrors.sol";
import { Swapper, LibSwap } from "../Helpers/Swapper.sol";

/// @title NXTP (Connext) Facet
/// @author LI.FI (https://li.fi)
/// @notice Provides functionality for bridging through NXTP (Connext)
contract NXTPFacet is ILiFi, Swapper, ReentrancyGuard {
    /// Storage ///

    bytes32 internal constant NAMESPACE = hex"cb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e"; //keccak256("com.lifi.facets.nxtp");
    struct Storage {
        ITransactionManager nxtpTxManager;
    }

    /// Events ///

    event NXTPInitialized(ITransactionManager txMgrAddr);

    /// Init ///

    // @notice Initializes local variables for the NXTP facet
    /// @param _txMgrAddr address of the NXTP Transaction Manager contract
    function initNXTP(ITransactionManager _txMgrAddr) external {
        LibDiamond.enforceIsContractOwner();
        if (address(_txMgrAddr) == address(0)) revert InvalidConfig();
        Storage storage s = getStorage();
        s.nxtpTxManager = _txMgrAddr;

        emit NXTPInitialized(_txMgrAddr);
    }

    /// External Methods ///

    /// @notice This function starts a cross-chain transaction using the NXTP protocol
    /// @param _lifiData data used purely for tracking and analytics
    /// @param _nxtpData data needed to complete an NXTP cross-chain transaction
    function startBridgeTokensViaNXTP(LiFiData calldata _lifiData, ITransactionManager.PrepareArgs calldata _nxtpData)
        external
        payable
        nonReentrant
    {
        LibAsset.depositAsset(_nxtpData.invariantData.sendingAssetId, _nxtpData.amount);
        _startBridge(_nxtpData);

        emit LiFiTransferStarted(
            _lifiData.transactionId,
            "nxtp",
            "",
            _lifiData.integrator,
            _lifiData.referrer,
            _nxtpData.invariantData.sendingAssetId,
            _lifiData.receivingAssetId,
            _nxtpData.invariantData.receivingAddress,
            _nxtpData.amount,
            _nxtpData.invariantData.receivingChainId,
            false,
            _nxtpData.invariantData.callTo != address(0)
        );
    }

    /// @notice This function performs a swap or multiple swaps and then starts a cross-chain transaction
    ///         using the NXTP protocol.
    /// @param _lifiData data used purely for tracking and analytics
    /// @param _swapData array of data needed for swaps
    /// @param _nxtpData data needed to complete an NXTP cross-chain transaction
    function swapAndStartBridgeTokensViaNXTP(
        LiFiData calldata _lifiData,
        LibSwap.SwapData[] calldata _swapData,
        ITransactionManager.PrepareArgs memory _nxtpData
    ) external payable nonReentrant {
        _nxtpData.amount = _executeAndCheckSwaps(_lifiData, _swapData);
        _startBridge(_nxtpData);

        emit LiFiTransferStarted(
            _lifiData.transactionId,
            "nxtp",
            "",
            _lifiData.integrator,
            _lifiData.referrer,
            _swapData[0].sendingAssetId,
            _lifiData.receivingAssetId,
            _nxtpData.invariantData.receivingAddress,
            _swapData[0].fromAmount,
            _nxtpData.invariantData.receivingChainId,
            true,
            _nxtpData.invariantData.callTo != address(0)
        );
    }

    /// @notice Completes a cross-chain transaction on the receiving chain using the NXTP protocol.
    /// @param _lifiData data used purely for tracking and analytics
    /// @param assetId token received on the receiving chain
    /// @param receiver address that will receive the tokens
    /// @param amount number of tokens received
    function completeBridgeTokensViaNXTP(
        LiFiData calldata _lifiData,
        address assetId,
        address receiver,
        uint256 amount
    ) external payable nonReentrant {
        LibAsset.depositAsset(assetId, amount);
        LibAsset.transferAsset(assetId, payable(receiver), amount);
        emit LiFiTransferCompleted(_lifiData.transactionId, assetId, receiver, amount, block.timestamp);
    }

    /// @notice Performs a swap before completing a cross-chain transaction
    ///         on the receiving chain using the NXTP protocol.
    /// @param _lifiData data used purely for tracking and analytics
    /// @param _swapData array of data needed for swaps
    /// @param finalAssetId token received on the receiving chain
    /// @param receiver address that will receive the tokens
    function swapAndCompleteBridgeTokensViaNXTP(
        LiFiData calldata _lifiData,
        LibSwap.SwapData[] calldata _swapData,
        address finalAssetId,
        address receiver
    ) external payable nonReentrant {
        uint256 swapBalance = _executeAndCheckSwaps(_lifiData, _swapData);
        LibAsset.transferAsset(finalAssetId, payable(receiver), swapBalance);
        emit LiFiTransferCompleted(_lifiData.transactionId, finalAssetId, receiver, swapBalance, block.timestamp);
    }

    /// @notice show the NXTP transaction manager contract address
    function getNXTPTransactionManager() external view returns (address) {
        Storage storage s = getStorage();
        return address(s.nxtpTxManager);
    }

    /// Private Methods ///

    /// @dev Conatains the business logic for the bridge via NXTP
    /// @param _nxtpData data specific to NXTP
    function _startBridge(ITransactionManager.PrepareArgs memory _nxtpData) private returns (bytes32) {
        Storage storage s = getStorage();
        IERC20 sendingAssetId = IERC20(_nxtpData.invariantData.sendingAssetId);
        // Give Connext approval to bridge tokens
        LibAsset.maxApproveERC20(IERC20(sendingAssetId), address(s.nxtpTxManager), _nxtpData.amount);

        uint256 value = LibAsset.isNativeAsset(address(sendingAssetId)) ? _nxtpData.amount : 0;

        // Initiate bridge transaction on sending chain
        ITransactionManager.TransactionData memory result = s.nxtpTxManager.prepare{ value: value }(_nxtpData);
        return result.transactionId;
    }

    /// @dev fetch local storage
    function getStorage() private pure returns (Storage storage s) {
        bytes32 namespace = NAMESPACE;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            s.slot := namespace
        }
    }
}

File 2 of 16 : ITransactionManager.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;

interface ITransactionManager {
    // Structs

    // Holds all data that is constant between sending and
    // receiving chains. The hash of this is what gets signed
    // to ensure the signature can be used on both chains.
    struct InvariantTransactionData {
        address receivingChainTxManagerAddress;
        address user;
        address router;
        address initiator; // msg.sender of sending side
        address sendingAssetId;
        address receivingAssetId;
        address sendingChainFallback; // funds sent here on cancel
        address receivingAddress;
        address callTo;
        uint256 sendingChainId;
        uint256 receivingChainId;
        bytes32 callDataHash; // hashed to prevent free option
        bytes32 transactionId;
    }

    // Holds all data that varies between sending and receiving
    // chains. The hash of this is stored onchain to ensure the
    // information passed in is valid.
    struct VariantTransactionData {
        uint256 amount;
        uint256 expiry;
        uint256 preparedBlockNumber;
    }

    // All Transaction data, constant and variable
    struct TransactionData {
        address receivingChainTxManagerAddress;
        address user;
        address router;
        address initiator; // msg.sender of sending side
        address sendingAssetId;
        address receivingAssetId;
        address sendingChainFallback;
        address receivingAddress;
        address callTo;
        bytes32 callDataHash;
        bytes32 transactionId;
        uint256 sendingChainId;
        uint256 receivingChainId;
        uint256 amount;
        uint256 expiry;
        uint256 preparedBlockNumber; // Needed for removal of active blocks on fulfill/cancel
    }

    // The structure of the signed data for fulfill
    struct SignedFulfillData {
        bytes32 transactionId;
        uint256 relayerFee;
        string functionIdentifier; // "fulfill" or "cancel"
        uint256 receivingChainId; // For domain separation
        address receivingChainTxManagerAddress; // For domain separation
    }

    // The structure of the signed data for cancellation
    struct SignedCancelData {
        bytes32 transactionId;
        string functionIdentifier;
        uint256 receivingChainId;
        address receivingChainTxManagerAddress; // For domain separation
    }

    /**
     * Arguments for calling prepare()
     * @param invariantData The data for a crosschain transaction that will
     *                      not change between sending and receiving chains.
     *                      The hash of this data is used as the key to store
     *                      the inforamtion that does change between chains
     *                      (amount,expiry,preparedBlock) for verification
     * @param amount The amount of the transaction on this chain
     * @param expiry The block.timestamp when the transaction will no longer be
     *               fulfillable and is freely cancellable on this chain
     * @param encryptedCallData The calldata to be executed when the tx is
     *                          fulfilled. Used in the function to allow the user
     *                          to reconstruct the tx from events. Hash is stored
     *                          onchain to prevent shenanigans.
     * @param encodedBid The encoded bid that was accepted by the user for this
     *                   crosschain transfer. It is supplied as a param to the
     *                   function but is only used in event emission
     * @param bidSignature The signature of the bidder on the encoded bid for
     *                     this transaction. Only used within the function for
     *                     event emission. The validity of the bid and
     *                     bidSignature are enforced offchain
     * @param encodedMeta The meta for the function
     */
    struct PrepareArgs {
        InvariantTransactionData invariantData;
        uint256 amount;
        uint256 expiry;
        bytes encryptedCallData;
        bytes encodedBid;
        bytes bidSignature;
        bytes encodedMeta;
    }

    /**
     * @param txData All of the data (invariant and variant) for a crosschain
     *               transaction. The variant data provided is checked against
     *               what was stored when the `prepare` function was called.
     * @param relayerFee The fee that should go to the relayer when they are
     *                   calling the function on the receiving chain for the user
     * @param signature The users signature on the transaction id + fee that
     *                  can be used by the router to unlock the transaction on
     *                  the sending chain
     * @param callData The calldata to be sent to and executed by the
     *                 `FulfillHelper`
     * @param encodedMeta The meta for the function
     */
    struct FulfillArgs {
        TransactionData txData;
        uint256 relayerFee;
        bytes signature;
        bytes callData;
        bytes encodedMeta;
    }

    /**
     * Arguments for calling cancel()
     * @param txData All of the data (invariant and variant) for a crosschain
     *               transaction. The variant data provided is checked against
     *               what was stored when the `prepare` function was called.
     * @param signature The user's signature that allows a transaction to be
     *                  cancelled by a relayer
     * @param encodedMeta The meta for the function
     */
    struct CancelArgs {
        TransactionData txData;
        bytes signature;
        bytes encodedMeta;
    }

    // Adding/removing asset events
    event RouterAdded(address indexed addedRouter, address indexed caller);

    event RouterRemoved(address indexed removedRouter, address indexed caller);

    // Adding/removing router events
    event AssetAdded(address indexed addedAssetId, address indexed caller);

    event AssetRemoved(address indexed removedAssetId, address indexed caller);

    // Liquidity events
    event LiquidityAdded(address indexed router, address indexed assetId, uint256 amount, address caller);

    event LiquidityRemoved(address indexed router, address indexed assetId, uint256 amount, address recipient);

    // Transaction events
    event TransactionPrepared(
        address indexed user,
        address indexed router,
        bytes32 indexed transactionId,
        TransactionData txData,
        address caller,
        PrepareArgs args
    );

    event TransactionFulfilled(
        address indexed user,
        address indexed router,
        bytes32 indexed transactionId,
        FulfillArgs args,
        bool success,
        bool isContract,
        bytes returnData,
        address caller
    );

    event TransactionCancelled(
        address indexed user,
        address indexed router,
        bytes32 indexed transactionId,
        CancelArgs args,
        address caller
    );

    // Getters
    function getChainId() external view returns (uint256);

    function getStoredChainId() external view returns (uint256);

    // Owner only methods
    function addRouter(address router) external;

    function removeRouter(address router) external;

    function addAssetId(address assetId) external;

    function removeAssetId(address assetId) external;

    // Router only methods
    function addLiquidityFor(
        uint256 amount,
        address assetId,
        address router
    ) external payable;

    function addLiquidity(uint256 amount, address assetId) external payable;

    function removeLiquidity(
        uint256 amount,
        address assetId,
        address payable recipient
    ) external;

    // Methods for crosschain transfers
    // called in the following order (in happy case)
    // 1. prepare by user on sending chain
    // 2. prepare by router on receiving chain
    // 3. fulfill by user on receiving chain
    // 4. fulfill by router on sending chain
    function prepare(PrepareArgs calldata args) external payable returns (TransactionData memory);

    function fulfill(FulfillArgs calldata args) external returns (TransactionData memory);

    function cancel(CancelArgs calldata args) external returns (TransactionData memory);
}

File 3 of 16 : ILiFi.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface ILiFi {
    /// Structs ///

    struct LiFiData {
        bytes32 transactionId;
        string integrator;
        address referrer;
        address sendingAssetId;
        address receivingAssetId;
        address receiver;
        uint256 destinationChainId;
        uint256 amount;
    }

    /// Events ///

    event LiFiTransferStarted(
        bytes32 indexed transactionId,
        string bridge,
        string bridgeData,
        string integrator,
        address referrer,
        address sendingAssetId,
        address receivingAssetId,
        address receiver,
        uint256 amount,
        uint256 destinationChainId,
        bool hasSourceSwap,
        bool hasDestinationCall
    );

    event LiFiTransferCompleted(
        bytes32 indexed transactionId,
        address receivingAssetId,
        address receiver,
        uint256 amount,
        uint256 timestamp
    );
}

File 4 of 16 : LibAsset.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
import { NullAddrIsNotAnERC20Token, NullAddrIsNotAValidSpender, NoTransferToNullAddress, InvalidAmount, NativeValueWithERC, NativeAssetTransferFailed } from "../Errors/GenericErrors.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title LibAsset
/// @author Connext <[email protected]>
/// @notice This library contains helpers for dealing with onchain transfers
///         of assets, including accounting for the native asset `assetId`
///         conventions and any noncompliant ERC20 transfers
library LibAsset {
    uint256 private constant MAX_INT = type(uint256).max;

    address internal constant NULL_ADDRESS = 0x0000000000000000000000000000000000000000; //address(0)

    /// @dev All native assets use the empty address for their asset id
    ///      by convention

    address internal constant NATIVE_ASSETID = NULL_ADDRESS; //address(0)

    /// @notice Gets the balance of the inheriting contract for the given asset
    /// @param assetId The asset identifier to get the balance of
    /// @return Balance held by contracts using this library
    function getOwnBalance(address assetId) internal view returns (uint256) {
        return assetId == NATIVE_ASSETID ? address(this).balance : IERC20(assetId).balanceOf(address(this));
    }

    /// @notice Transfers ether from the inheriting contract to a given
    ///         recipient
    /// @param recipient Address to send ether to
    /// @param amount Amount to send to given recipient
    function transferNativeAsset(address payable recipient, uint256 amount) private {
        if (recipient == NULL_ADDRESS) revert NoTransferToNullAddress();
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = recipient.call{ value: amount }("");
        if (!success) revert NativeAssetTransferFailed();
    }

    /// @notice Gives MAX approval for another address to spend tokens
    /// @param assetId Token address to transfer
    /// @param spender Address to give spend approval to
    /// @param amount Amount to approve for spending
    function maxApproveERC20(
        IERC20 assetId,
        address spender,
        uint256 amount
    ) internal {
        if (address(assetId) == NATIVE_ASSETID) return;
        if (spender == NULL_ADDRESS) revert NullAddrIsNotAValidSpender();
        uint256 allowance = assetId.allowance(address(this), spender);
        if (allowance < amount) SafeERC20.safeApprove(IERC20(assetId), spender, MAX_INT);
    }

    /// @notice Transfers tokens from the inheriting contract to a given
    ///         recipient
    /// @param assetId Token address to transfer
    /// @param recipient Address to send token to
    /// @param amount Amount to send to given recipient
    function transferERC20(
        address assetId,
        address recipient,
        uint256 amount
    ) private {
        if (isNativeAsset(assetId)) revert NullAddrIsNotAnERC20Token();
        SafeERC20.safeTransfer(IERC20(assetId), recipient, amount);
    }

    /// @notice Transfers tokens from a sender to a given recipient
    /// @param assetId Token address to transfer
    /// @param from Address of sender/owner
    /// @param to Address of recipient/spender
    /// @param amount Amount to transfer from owner to spender
    function transferFromERC20(
        address assetId,
        address from,
        address to,
        uint256 amount
    ) internal {
        if (assetId == NATIVE_ASSETID) revert NullAddrIsNotAnERC20Token();
        if (to == NULL_ADDRESS) revert NoTransferToNullAddress();
        SafeERC20.safeTransferFrom(IERC20(assetId), from, to, amount);
    }

    /// @notice Deposits an asset into the contract and performs checks to avoid NativeValueWithERC
    /// @param tokenId Token to deposit
    /// @param amount Amount to deposit
    /// @param isNative Wether the token is native or ERC20
    function depositAsset(
        address tokenId,
        uint256 amount,
        bool isNative
    ) internal {
        if (amount == 0) revert InvalidAmount();
        if (isNative) {
            if (msg.value != amount) revert InvalidAmount();
        } else {
            if (msg.value != 0) revert NativeValueWithERC();
            uint256 _fromTokenBalance = LibAsset.getOwnBalance(tokenId);
            LibAsset.transferFromERC20(tokenId, msg.sender, address(this), amount);
            if (LibAsset.getOwnBalance(tokenId) - _fromTokenBalance != amount) revert InvalidAmount();
        }
    }

    /// @notice Overload for depositAsset(address tokenId, uint256 amount, bool isNative)
    /// @param tokenId Token to deposit
    /// @param amount Amount to deposit
    function depositAsset(address tokenId, uint256 amount) internal {
        return depositAsset(tokenId, amount, tokenId == NATIVE_ASSETID);
    }

    /// @notice Determines whether the given assetId is the native asset
    /// @param assetId The asset identifier to evaluate
    /// @return Boolean indicating if the asset is the native asset
    function isNativeAsset(address assetId) internal pure returns (bool) {
        return assetId == NATIVE_ASSETID;
    }

    /// @notice Wrapper function to transfer a given asset (native or erc20) to
    ///         some recipient. Should handle all non-compliant return value
    ///         tokens as well by using the SafeERC20 contract by open zeppelin.
    /// @param assetId Asset id for transfer (address(0) for native asset,
    ///                token address for erc20s)
    /// @param recipient Address to send asset to
    /// @param amount Amount to send to given recipient
    function transferAsset(
        address assetId,
        address payable recipient,
        uint256 amount
    ) internal {
        (assetId == NATIVE_ASSETID)
            ? transferNativeAsset(recipient, amount)
            : transferERC20(assetId, recipient, amount);
    }

    /// @dev Checks whether the given address is a contract and contains code
    function isContract(address _contractAddr) internal view returns (bool) {
        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(_contractAddr)
        }
        return size > 0;
    }
}

File 5 of 16 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import { IDiamondCut } from "../Interfaces/IDiamondCut.sol";

library LibDiamond {
    bytes32 internal 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;
        // solhint-disable-next-line no-inline-assembly
        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 enforceIsContractOwner() internal view {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

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

    // 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");
            }
            // solhint-disable-next-line avoid-low-level-calls
            (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;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}

File 6 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;

/// @title Reentrancy Guard
/// @author LI.FI (https://li.fi)
/// @notice Abstract contract to provide protection against reentrancy
abstract contract ReentrancyGuard {
    /// Storage ///

    bytes32 private constant NAMESPACE = hex"a65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b";

    /// Types ///

    struct ReentrancyStorage {
        uint256 status;
    }

    /// Errors ///

    error ReentrancyError();

    /// Constants ///

    uint256 private constant _NOT_ENTERED = 0;
    uint256 private constant _ENTERED = 1;

    /// Modifiers ///

    modifier nonReentrant() {
        ReentrancyStorage storage s = reentrancyStorage();
        if (s.status == _ENTERED) revert ReentrancyError();
        s.status = _ENTERED;
        _;
        s.status = _NOT_ENTERED;
    }

    /// Private Methods ///

    /// @dev fetch local storage
    function reentrancyStorage() private pure returns (ReentrancyStorage storage data) {
        bytes32 position = NAMESPACE;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            data.slot := position
        }
    }
}

File 7 of 16 : GenericErrors.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

error InvalidAmount();
error TokenAddressIsZero();
error CannotBridgeToSameNetwork();
error ZeroPostSwapBalance();
error InvalidBridgeConfigLength();
error NoSwapDataProvided();
error NativeValueWithERC();
error ContractCallNotAllowed();
error NullAddrIsNotAValidSpender();
error NullAddrIsNotAnERC20Token();
error NoTransferToNullAddress();
error NativeAssetTransferFailed();
error InvalidContract();
error InvalidConfig();

File 8 of 16 : Swapper.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import { ILiFi } from "../Interfaces/ILiFi.sol";
import { LibSwap } from "../Libraries/LibSwap.sol";
import { LibAsset } from "../Libraries/LibAsset.sol";
import { LibStorage } from "../Libraries/LibStorage.sol";
import { LibAsset } from "../Libraries/LibAsset.sol";
import { InvalidAmount, ContractCallNotAllowed, NoSwapDataProvided } from "../Errors/GenericErrors.sol";

/// @title Swapper
/// @author LI.FI (https://li.fi)
/// @notice Abstract contract to provide swap functionality
contract Swapper is ILiFi {
    /// Storage ///

    LibStorage internal appStorage;

    /// Modifiers ///

    /// @dev Sends any leftover balances back to the user
    modifier noLeftovers(LibSwap.SwapData[] calldata _swapData) {
        uint256 nSwaps = _swapData.length;
        if (nSwaps != 1) {
            uint256[] memory initialBalances = _fetchBalances(_swapData);
            address finalAsset = _swapData[nSwaps - 1].receivingAssetId;
            uint256 curBalance = 0;

            _;

            for (uint256 i = 0; i < nSwaps - 1; i++) {
                address curAsset = _swapData[i].receivingAssetId;
                if (curAsset == finalAsset) continue; // Handle multi-to-one swaps
                curBalance = LibAsset.getOwnBalance(curAsset) - initialBalances[i];
                if (curBalance > 0) LibAsset.transferAsset(curAsset, payable(msg.sender), curBalance);
            }
        } else _;
    }

    /// Internal Methods ///

    /// @dev Validates input before executing swaps
    /// @param _lifiData LiFi tracking data
    /// @param _swapData Array of data used to execute swaps
    function _executeAndCheckSwaps(LiFiData memory _lifiData, LibSwap.SwapData[] calldata _swapData)
        internal
        returns (uint256)
    {
        uint256 nSwaps = _swapData.length;
        if (nSwaps == 0) revert NoSwapDataProvided();
        address finalTokenId = _swapData[_swapData.length - 1].receivingAssetId;
        uint256 swapBalance = LibAsset.getOwnBalance(finalTokenId);
        _executeSwaps(_lifiData, _swapData);
        swapBalance = LibAsset.getOwnBalance(finalTokenId) - swapBalance;
        if (swapBalance == 0) revert InvalidAmount();
        return swapBalance;
    }

    /// Private Methods ///

    /// @dev Executes swaps and checks that DEXs used are in the allowList
    /// @param _lifiData LiFi tracking data
    /// @param _swapData Array of data used to execute swaps
    function _executeSwaps(LiFiData memory _lifiData, LibSwap.SwapData[] calldata _swapData)
        private
        noLeftovers(_swapData)
    {
        for (uint256 i = 0; i < _swapData.length; i++) {
            LibSwap.SwapData calldata currentSwapData = _swapData[i];
            if (
                !(appStorage.dexAllowlist[currentSwapData.approveTo] &&
                    appStorage.dexAllowlist[currentSwapData.callTo] &&
                    appStorage.dexFuncSignatureAllowList[bytes32(currentSwapData.callData[:8])])
            ) revert ContractCallNotAllowed();
            LibSwap.swap(_lifiData.transactionId, currentSwapData);
        }
    }

    /// @dev Fetches balances of tokens to be swapped before swapping.
    /// @param _swapData Array of data used to execute swaps
    /// @return uint256[] Array of token balances.
    function _fetchBalances(LibSwap.SwapData[] calldata _swapData) private view returns (uint256[] memory) {
        uint256 length = _swapData.length;
        uint256[] memory balances = new uint256[](length);
        for (uint256 i = 0; i < length; i++) balances[i] = LibAsset.getOwnBalance(_swapData[i].receivingAssetId);
        return balances;
    }
}

File 9 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 11 of 16 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 16 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IDiamondCut {
    enum FacetCutAction {
        Add,
        Replace,
        Remove
    }
    // Add=0, Replace=1, Remove=2

    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 13 of 16 : LibSwap.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import { LibAsset, IERC20 } from "./LibAsset.sol";
import { LibUtil } from "./LibUtil.sol";
import { InvalidContract } from "../Errors/GenericErrors.sol";

library LibSwap {
    error NoSwapFromZeroBalance();

    struct SwapData {
        address callTo;
        address approveTo;
        address sendingAssetId;
        address receivingAssetId;
        uint256 fromAmount;
        bytes callData;
    }

    event AssetSwapped(
        bytes32 transactionId,
        address dex,
        address fromAssetId,
        address toAssetId,
        uint256 fromAmount,
        uint256 toAmount,
        uint256 timestamp
    );

    function swap(bytes32 transactionId, SwapData calldata _swapData) internal {
        if (!LibAsset.isContract(_swapData.callTo)) revert InvalidContract();
        uint256 fromAmount = _swapData.fromAmount;
        if (fromAmount == 0) revert NoSwapFromZeroBalance();
        uint256 nativeValue = 0;
        address fromAssetId = _swapData.sendingAssetId;
        address toAssetId = _swapData.receivingAssetId;
        uint256 initialSendingAssetBalance = LibAsset.getOwnBalance(fromAssetId);
        uint256 initialReceivingAssetBalance = LibAsset.getOwnBalance(toAssetId);
        uint256 toDeposit = initialSendingAssetBalance < fromAmount ? fromAmount - initialSendingAssetBalance : 0;

        if (!LibAsset.isNativeAsset(fromAssetId)) {
            LibAsset.maxApproveERC20(IERC20(fromAssetId), _swapData.approveTo, fromAmount);
            if (toDeposit != 0) {
                LibAsset.transferFromERC20(fromAssetId, msg.sender, address(this), toDeposit);
            }
        } else {
            nativeValue = fromAmount;
        }

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory res) = _swapData.callTo.call{ value: nativeValue }(_swapData.callData);
        if (!success) {
            string memory reason = LibUtil.getRevertMsg(res);
            revert(reason);
        }

        emit AssetSwapped(
            transactionId,
            _swapData.callTo,
            _swapData.sendingAssetId,
            toAssetId,
            fromAmount,
            LibAsset.getOwnBalance(toAssetId) - initialReceivingAssetBalance,
            block.timestamp
        );
    }
}

File 14 of 16 : LibStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

struct LibStorage {
    mapping(address => bool) dexAllowlist;
    mapping(bytes32 => bool) dexFuncSignatureAllowList;
    address[] dexs;
}

File 15 of 16 : LibUtil.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./LibBytes.sol";

library LibUtil {
    using LibBytes for bytes;

    function getRevertMsg(bytes memory _res) internal pure returns (string memory) {
        // If the _res length is less than 68, then the transaction failed silently (without a revert message)
        if (_res.length < 68) return "Transaction reverted silently";
        bytes memory revertData = _res.slice(4, _res.length - 4); // Remove the selector which is the first 4 bytes
        return abi.decode(revertData, (string)); // All that remains is the revert string
    }
}

File 16 of 16 : LibBytes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

library LibBytes {
    // solhint-disable no-inline-assembly

    function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {
        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Store the length of the first bytes array at the beginning of
            // the memory for tempBytes.
            let length := mload(_preBytes)
            mstore(tempBytes, length)

            // Maintain a memory counter for the current write location in the
            // temp bytes array by adding the 32 bytes for the array length to
            // the starting location.
            let mc := add(tempBytes, 0x20)
            // Stop copying when the memory counter reaches the length of the
            // first bytes array.
            let end := add(mc, length)

            for {
                // Initialize a copy counter to the start of the _preBytes data,
                // 32 bytes into its memory.
                let cc := add(_preBytes, 0x20)
            } lt(mc, end) {
                // Increase both counters by 32 bytes each iteration.
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                // Write the _preBytes data into the tempBytes memory 32 bytes
                // at a time.
                mstore(mc, mload(cc))
            }

            // Add the length of _postBytes to the current length of tempBytes
            // and store it as the new length in the first 32 bytes of the
            // tempBytes memory.
            length := mload(_postBytes)
            mstore(tempBytes, add(length, mload(tempBytes)))

            // Move the memory counter back from a multiple of 0x20 to the
            // actual end of the _preBytes data.
            mc := end
            // Stop copying when the memory counter reaches the new combined
            // length of the arrays.
            end := add(mc, length)

            for {
                let cc := add(_postBytes, 0x20)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            // Update the free-memory pointer by padding our last write location
            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
            // next 32 byte block, then round down to the nearest multiple of
            // 32. If the sum of the length of the two arrays is zero then add
            // one before rounding down to leave a blank 32 bytes (the length block with 0).
            mstore(
                0x40,
                and(
                    add(add(end, iszero(add(length, mload(_preBytes)))), 31),
                    not(31) // Round down to the nearest 32 bytes.
                )
            )
        }

        return tempBytes;
    }

    function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
        assembly {
            // Read the first 32 bytes of _preBytes storage, which is the length
            // of the array. (We don't need to use the offset into the slot
            // because arrays use the entire slot.)
            let fslot := sload(_preBytes.slot)
            // Arrays of 31 bytes or less have an even value in their slot,
            // while longer arrays have an odd value. The actual length is
            // the slot divided by two for odd values, and the lowest order
            // byte divided by two for even values.
            // If the slot is even, bitwise and the slot with 255 and divide by
            // two to get the length. If the slot is odd, bitwise and the slot
            // with -1 and divide by two.
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
                // Since the new array still fits in the slot, we just need to
                // update the contents of the slot.
                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                    _preBytes.slot,
                    // all the modifications to the slot are inside this
                    // next block
                    add(
                        // we can just add to the slot contents because the
                        // bytes we want to change are the LSBs
                        fslot,
                        add(
                            mul(
                                div(
                                    // load the bytes from memory
                                    mload(add(_postBytes, 0x20)),
                                    // zero all bytes to the right
                                    exp(0x100, sub(32, mlength))
                                ),
                                // and now shift left the number of bytes to
                                // leave space for the length in the slot
                                exp(0x100, sub(32, newlength))
                            ),
                            // increase length by the double of the memory
                            // bytes length
                            mul(mlength, 2)
                        )
                    )
                )
            }
            case 1 {
                // The stored value fits in the slot, but the combined value
                // will exceed it.
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // The contents of the _postBytes array start 32 bytes into
                // the structure. Our first read should obtain the `submod`
                // bytes that can fit into the unused space in the last word
                // of the stored array. To get this, we read 32 bytes starting
                // from `submod`, so the data we read overlaps with the array
                // contents by `submod` bytes. Masking the lowest-order
                // `submod` bytes allows us to add that value directly to the
                // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                    sc,
                    add(
                        and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00),
                        and(mload(mc), mask)
                    )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // Copy over the first `submod` bytes of the new data as in
                // case 1 above.
                let slengthmod := mod(slength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    ) internal pure returns (bytes memory) {
        require(_length + 31 >= _length, "slice_overflow");
        require(_bytes.length >= _start + _length, "slice_outOfBounds");

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)
                //zero out the 32 bytes slice we are about to return
                //we need to do it because Solidity does not garbage collect
                mstore(tempBytes, 0)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {
        require(_bytes.length >= _start + 1, "toUint8_outOfBounds");
        uint8 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x1), _start))
        }

        return tempUint;
    }

    function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {
        require(_bytes.length >= _start + 2, "toUint16_outOfBounds");
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }

    function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {
        require(_bytes.length >= _start + 4, "toUint32_outOfBounds");
        uint32 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x4), _start))
        }

        return tempUint;
    }

    function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {
        require(_bytes.length >= _start + 8, "toUint64_outOfBounds");
        uint64 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x8), _start))
        }

        return tempUint;
    }

    function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {
        require(_bytes.length >= _start + 12, "toUint96_outOfBounds");
        uint96 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xc), _start))
        }

        return tempUint;
    }

    function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {
        require(_bytes.length >= _start + 16, "toUint128_outOfBounds");
        uint128 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x10), _start))
        }

        return tempUint;
    }

    function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {
        require(_bytes.length >= _start + 32, "toUint256_outOfBounds");
        uint256 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {
        require(_bytes.length >= _start + 32, "toBytes32_outOfBounds");
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                    // the next line is the loop condition:
                    // while(uint256(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {
        bool success = true;

        assembly {
            // we know _preBytes_offset is 0
            let fslot := sload(_preBytes.slot)
            // Decode the length of the stored array like in concatStorage().
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)

            // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
                // slength can contain both the length and contents of the array
                // if length < 32 bytes so let's prepare for that
                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                        // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                            // unsuccess:
                            success := 0
                        }
                    }
                    default {
                        // cb is a circuit breaker in the for loop since there's
                        //  no said feature for inline assembly loops
                        // cb = 1 - don't breaker
                        // cb = 0 - break
                        let cb := 1

                        // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes.slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                        // the next line is the loop condition:
                        // while(uint256(mc < end) + cb == 2)
                        // solhint-disable-next-line no-empty-blocks
                        for {

                        } eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                                // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ContractCallNotAllowed","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidConfig","type":"error"},{"inputs":[],"name":"InvalidContract","type":"error"},{"inputs":[],"name":"NativeAssetTransferFailed","type":"error"},{"inputs":[],"name":"NativeValueWithERC","type":"error"},{"inputs":[],"name":"NoSwapDataProvided","type":"error"},{"inputs":[],"name":"NoSwapFromZeroBalance","type":"error"},{"inputs":[],"name":"NoTransferToNullAddress","type":"error"},{"inputs":[],"name":"NullAddrIsNotAValidSpender","type":"error"},{"inputs":[],"name":"NullAddrIsNotAnERC20Token","type":"error"},{"inputs":[],"name":"ReentrancyError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receivingAssetId","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"LiFiTransferCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"indexed":false,"internalType":"string","name":"bridge","type":"string"},{"indexed":false,"internalType":"string","name":"bridgeData","type":"string"},{"indexed":false,"internalType":"string","name":"integrator","type":"string"},{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"address","name":"sendingAssetId","type":"address"},{"indexed":false,"internalType":"address","name":"receivingAssetId","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"hasSourceSwap","type":"bool"},{"indexed":false,"internalType":"bool","name":"hasDestinationCall","type":"bool"}],"name":"LiFiTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ITransactionManager","name":"txMgrAddr","type":"address"}],"name":"NXTPInitialized","type":"event"},{"inputs":[{"components":[{"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"internalType":"string","name":"integrator","type":"string"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ILiFi.LiFiData","name":"_lifiData","type":"tuple"},{"internalType":"address","name":"assetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"completeBridgeTokensViaNXTP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getNXTPTransactionManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ITransactionManager","name":"_txMgrAddr","type":"address"}],"name":"initNXTP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"internalType":"string","name":"integrator","type":"string"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ILiFi.LiFiData","name":"_lifiData","type":"tuple"},{"components":[{"components":[{"internalType":"address","name":"receivingChainTxManagerAddress","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"sendingChainFallback","type":"address"},{"internalType":"address","name":"receivingAddress","type":"address"},{"internalType":"address","name":"callTo","type":"address"},{"internalType":"uint256","name":"sendingChainId","type":"uint256"},{"internalType":"uint256","name":"receivingChainId","type":"uint256"},{"internalType":"bytes32","name":"callDataHash","type":"bytes32"},{"internalType":"bytes32","name":"transactionId","type":"bytes32"}],"internalType":"struct ITransactionManager.InvariantTransactionData","name":"invariantData","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bytes","name":"encryptedCallData","type":"bytes"},{"internalType":"bytes","name":"encodedBid","type":"bytes"},{"internalType":"bytes","name":"bidSignature","type":"bytes"},{"internalType":"bytes","name":"encodedMeta","type":"bytes"}],"internalType":"struct ITransactionManager.PrepareArgs","name":"_nxtpData","type":"tuple"}],"name":"startBridgeTokensViaNXTP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"internalType":"string","name":"integrator","type":"string"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ILiFi.LiFiData","name":"_lifiData","type":"tuple"},{"components":[{"internalType":"address","name":"callTo","type":"address"},{"internalType":"address","name":"approveTo","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct LibSwap.SwapData[]","name":"_swapData","type":"tuple[]"},{"internalType":"address","name":"finalAssetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"name":"swapAndCompleteBridgeTokensViaNXTP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"transactionId","type":"bytes32"},{"internalType":"string","name":"integrator","type":"string"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ILiFi.LiFiData","name":"_lifiData","type":"tuple"},{"components":[{"internalType":"address","name":"callTo","type":"address"},{"internalType":"address","name":"approveTo","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct LibSwap.SwapData[]","name":"_swapData","type":"tuple[]"},{"components":[{"components":[{"internalType":"address","name":"receivingChainTxManagerAddress","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"sendingAssetId","type":"address"},{"internalType":"address","name":"receivingAssetId","type":"address"},{"internalType":"address","name":"sendingChainFallback","type":"address"},{"internalType":"address","name":"receivingAddress","type":"address"},{"internalType":"address","name":"callTo","type":"address"},{"internalType":"uint256","name":"sendingChainId","type":"uint256"},{"internalType":"uint256","name":"receivingChainId","type":"uint256"},{"internalType":"bytes32","name":"callDataHash","type":"bytes32"},{"internalType":"bytes32","name":"transactionId","type":"bytes32"}],"internalType":"struct ITransactionManager.InvariantTransactionData","name":"invariantData","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bytes","name":"encryptedCallData","type":"bytes"},{"internalType":"bytes","name":"encodedBid","type":"bytes"},{"internalType":"bytes","name":"bidSignature","type":"bytes"},{"internalType":"bytes","name":"encodedMeta","type":"bytes"}],"internalType":"struct ITransactionManager.PrepareArgs","name":"_nxtpData","type":"tuple"}],"name":"swapAndStartBridgeTokensViaNXTP","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b5061291e806100206000396000f3fe6080604052600436106100655760003560e01c80637d7aecd3116100435780637d7aecd3146100dd578063bfa1fc0a146100f0578063cf76d3131461011057600080fd5b806328225f0c1461006a5780632a7a70421461007f5780634f7c96b514610092575b600080fd5b61007d610078366004611c1a565b610123565b005b61007d61008d36600461200e565b6101f8565b34801561009e57600080fd5b507fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e54604080516001600160a01b039092168252519081900360200190f35b61007d6100eb36600461209c565b610362565b3480156100fc57600080fd5b5061007d61010b366004612108565b6104c7565b61007d61011e366004612125565b61059a565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b805460001901610180576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001815561018e848361067d565b610199848484610696565b604080516001600160a01b038087168252851660208201529081018390524260608201528535907fb8c86983f929c6b770461983d1bbde1870408120f07123e9c12d49f35a0b4c4b906080015b60405180910390a26000905550505050565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b805460001901610255576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001815561026c610265866121b6565b85856106bf565b602083015261027a826107b2565b5084357f438f81f3fe94456cd9d98e9073524f1c2bafb3ce75def8ced69f708061ddd5c46102ab6020880188612262565b6102bb60608a0160408b01612108565b888860008181106102ce576102ce6122c7565b90506020028101906102e091906122f6565b6102f1906060810190604001612108565b61030160a08c0160808d01612108565b885160e001518b8b600081610318576103186122c7565b905060200281019061032a91906122f6565b8a51610140810151610100909101516040516101e6999897969594936080013592916001916001600160a01b03909116151590612334565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b8054600019016103bf576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181556103e16103d660a0840160808501612108565b836101a0013561067d565b6103f26103ed83612417565b6107b2565b5082357f438f81f3fe94456cd9d98e9073524f1c2bafb3ce75def8ced69f708061ddd5c46104236020860186612262565b6104336060880160408901612108565b61044360a0880160808901612108565b61045360a08a0160808b01612108565b6104646101008a0160e08b01612108565b896101a001358a60000161014001356000806001600160a01b03168d6000016101000160208101906104969190612108565b6001600160a01b031614156040516104b79a99989796959493929190612334565b60405180910390a2600090555050565b6104cf6108ba565b6001600160a01b03811661050f576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e80546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117825560408051918252517f2ef7cbc72cbbb19695283339290d52328d612ad910a40b47fe777e67f593320e9181900360200190a15050565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b8054600019016105f7576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181556000610610610609886121b6565b87876106bf565b905061061d848483610696565b604080516001600160a01b038087168252851660208201529081018290524260608201528735907fb8c86983f929c6b770461983d1bbde1870408120f07123e9c12d49f35a0b4c4b9060800160405180910390a250600090555050505050565b61069282826001600160a01b0382161561097d565b5050565b6001600160a01b038316156106b5576106b0838383610a98565b505050565b6106b08282610ae3565b6000818082036106fb576040517f0503c3ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848461070a600182612452565b818110610719576107196122c7565b905060200281019061072b91906122f6565b61073c906080810190606001612108565b9050600061074982610bb0565b9050610756878787610c4f565b8061076083610bb0565b61076a9190612452565b9050806000036107a6576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b925050505b9392505050565b8051608001517fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e80546020840151600093916107f99183916001600160a01b031690610fe3565b60006001600160a01b03821615610811576000610817565b84602001515b83546040517fd94593720000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b039091169063d9459372908490610867908a906004016125cc565b6102006040518083038185885af1158015610886573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108ab9190612682565b61014001519695505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b0316331461097b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b565b816000036109b7576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156109f6578134146106b0576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3415610a2d576040517e3f45b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a3884610bb0565b9050610a46843330866110da565b8281610a5186610bb0565b610a5b9190612452565b14610a92576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6001600160a01b038316610ad8576040517fd1bebf0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106b0838383611166565b6001600160a01b038216610b23576040517f21f7434500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b70576040519150601f19603f3d011682016040523d82523d6000602084013e610b75565b606091505b50509050806106b0576040517f5a04673700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b03821615610c47576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610c1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c429190612787565b610c49565b475b92915050565b81818060018114610ea8576000610c66848461120f565b905060008484610c77600186612452565b818110610c8657610c866122c7565b9050602002810190610c9891906122f6565b610ca9906080810190606001612108565b90506000805b87811015610ddd5736898983818110610cca57610cca6122c7565b9050602002810190610cdc91906122f6565b9050600080610cf16040840160208501612108565b6001600160a01b0316815260208101919091526040016000205460ff168015610d435750600080610d256020840184612108565b6001600160a01b0316815260208101919091526040016000205460ff165b8015610d88575060016000610d5b60a0840184612262565b610d6a916008916000916127a0565b610d73916127ca565b815260208101919091526040016000205460ff165b610dbe576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a51610dca90826112d9565b5080610dd5816127e8565b915050610caf565b5060005b610dec600186612452565b811015610e9f576000878783818110610e0757610e076122c7565b9050602002810190610e1991906122f6565b610e2a906080810190606001612108565b9050836001600160a01b0316816001600160a01b031603610e4b5750610e8d565b848281518110610e5d57610e5d6122c7565b6020026020010151610e6e82610bb0565b610e789190612452565b92508215610e8b57610e8b813385610696565b505b80610e97816127e8565b915050610de1565b50505050610fdb565b60005b84811015610fd95736868683818110610ec657610ec66122c7565b9050602002810190610ed891906122f6565b9050600080610eed6040840160208501612108565b6001600160a01b0316815260208101919091526040016000205460ff168015610f3f5750600080610f216020840184612108565b6001600160a01b0316815260208101919091526040016000205460ff165b8015610f84575060016000610f5760a0840184612262565b610f66916008916000916127a0565b610f6f916127ca565b815260208101919091526040016000205460ff165b610fba576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8751610fc690826112d9565b5080610fd1816127e8565b915050610eab565b505b505050505050565b6001600160a01b038316610ff657505050565b6001600160a01b038216611036576040517f63ba9bff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c39190612787565b905081811015610a9257610a928484600019611572565b6001600160a01b03841661111a576040517fd1bebf0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821661115a576040517f21f7434500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a92848484846116da565b6040516001600160a01b0383166024820152604481018290526106b09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261172b565b60608160008167ffffffffffffffff81111561122d5761122d611cd0565b604051908082528060200260200182016040528015611256578160200160208202803683370190505b50905060005b828110156112d0576112a1868683818110611279576112796122c7565b905060200281019061128b91906122f6565b61129c906080810190606001612108565b610bb0565b8282815181106112b3576112b36122c7565b6020908102919091010152806112c8816127e8565b91505061125c565b50949350505050565b6112ef6112e96020830183612108565b3b151590565b611325576040517f6eefed2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101356000819003611365576040517fe46e079c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113786060850160408601612108565b9050600061138c6080860160608701612108565b9050600061139983610bb0565b905060006113a683610bb0565b905060008683106113b85760006113c2565b6113c28388612452565b90506001600160a01b03851615611404576113ed856113e760408b0160208c01612108565b89610fe3565b80156113ff576113ff853330846110da565b611408565b8695505b60008061141860208b018b612108565b6001600160a01b03168861142f60a08d018d612262565b60405161143d929190612802565b60006040518083038185875af1925050503d806000811461147a576040519150601f19603f3d011682016040523d82523d6000602084013e61147f565b606091505b5091509150816114ca5760006114948261182a565b9050806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729190612812565b7f7bfdfdb5e3a3776976e53cb0607060f54c5312701c8cba1155cc4d5394440b388b6114f960208d018d612108565b61150960608e0160408f01612108565b898d896115158d610bb0565b61151f9190612452565b604080519687526001600160a01b0395861660208801529385169386019390935292166060840152608083019190915260a08201524260c082015260e00160405180910390a15050505050505050505050565b80158061160557506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156115df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116039190612787565b155b611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610972565b6040516001600160a01b0383166024820152604481018290526106b09084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016111ab565b6040516001600160a01b0380851660248301528316604482015260648101829052610a929085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111ab565b6000611780826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118a19092919063ffffffff16565b8051909150156106b0578080602001905181019061179e9190612825565b6106b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610972565b606060448251101561186f57505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600061188b60048085516118839190612452565b8591906118b8565b9050808060200190518101906107ab9190612847565b60606118b08484600085611a13565b949350505050565b6060816118c681601f6128be565b101561192e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610972565b61193882846128be565b845110156119a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610972565b6060821580156119c157604051915060008252602082016040526112d0565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119fa5780518352602092830192016119e2565b5050858452601f01601f19166040525050949350505050565b606082471015611aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610972565b843b611b0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610972565b600080866001600160a01b03168587604051611b2991906128d6565b60006040518083038185875af1925050503d8060008114611b66576040519150601f19603f3d011682016040523d82523d6000602084013e611b6b565b606091505b5091509150611b7b828286611b86565b979650505050505050565b60608315611b955750816107ab565b825115611ba55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729190612812565b60006101008284031215611bec57600080fd5b50919050565b6001600160a01b0381168114611c0757600080fd5b50565b8035611c1581611bf2565b919050565b60008060008060808587031215611c3057600080fd5b843567ffffffffffffffff811115611c4757600080fd5b611c5387828801611bd9565b9450506020850135611c6481611bf2565b92506040850135611c7481611bf2565b9396929550929360600135925050565b60008083601f840112611c9657600080fd5b50813567ffffffffffffffff811115611cae57600080fd5b6020830191508360208260051b8501011115611cc957600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff81118282101715611d2357611d23611cd0565b60405290565b60405160e0810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051610100810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051610200810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051601f8201601f1916810167ffffffffffffffff81118282101715611dbd57611dbd611cd0565b604052919050565b60006101a08284031215611dd857600080fd5b611de0611cff565b9050611deb82611c0a565b8152611df960208301611c0a565b6020820152611e0a60408301611c0a565b6040820152611e1b60608301611c0a565b6060820152611e2c60808301611c0a565b6080820152611e3d60a08301611c0a565b60a0820152611e4e60c08301611c0a565b60c0820152611e5f60e08301611c0a565b60e0820152610100611e72818401611c0a565b908201526101208281013590820152610140808301359082015261016080830135908201526101809182013591810191909152919050565b600067ffffffffffffffff821115611ec457611ec4611cd0565b50601f01601f191660200190565b600082601f830112611ee357600080fd5b8135611ef6611ef182611eaa565b611d94565b818152846020838601011115611f0b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006102608284031215611f3b57600080fd5b611f43611d29565b9050611f4f8383611dc5565b81526101a082013560208201526101c082013560408201526101e082013567ffffffffffffffff80821115611f8357600080fd5b611f8f85838601611ed2565b6060840152610200840135915080821115611fa957600080fd5b611fb585838601611ed2565b6080840152610220840135915080821115611fcf57600080fd5b611fdb85838601611ed2565b60a0840152610240840135915080821115611ff557600080fd5b5061200284828501611ed2565b60c08301525092915050565b6000806000806060858703121561202457600080fd5b843567ffffffffffffffff8082111561203c57600080fd5b61204888838901611bd9565b9550602087013591508082111561205e57600080fd5b61206a88838901611c84565b9095509350604087013591508082111561208357600080fd5b5061209087828801611f28565b91505092959194509250565b600080604083850312156120af57600080fd5b823567ffffffffffffffff808211156120c757600080fd5b6120d386838701611bd9565b935060208501359150808211156120e957600080fd5b50830161026081860312156120fd57600080fd5b809150509250929050565b60006020828403121561211a57600080fd5b81356107ab81611bf2565b60008060008060006080868803121561213d57600080fd5b853567ffffffffffffffff8082111561215557600080fd5b61216189838a01611bd9565b9650602088013591508082111561217757600080fd5b5061218488828901611c84565b909550935050604086013561219881611bf2565b915060608601356121a881611bf2565b809150509295509295909350565b600061010082360312156121c957600080fd5b6121d1611d4c565b82358152602083013567ffffffffffffffff8111156121ef57600080fd5b6121fb36828601611ed2565b60208301525061220d60408401611c0a565b604082015261221e60608401611c0a565b606082015261222f60808401611c0a565b608082015261224060a08401611c0a565b60a082015260c083013560c082015260e083013560e082015280915050919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261229757600080fd5b83018035915067ffffffffffffffff8211156122b257600080fd5b602001915036819003821315611cc957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261232a57600080fd5b9190910192915050565b6000610160808352600481840152507f6e787470000000000000000000000000000000000000000000000000000000006101808301526101a0806020840152600081840152506101c08060408401528b81840152506101e08b8d8285013760008c84018201526001600160a01b038b166060840152601f19601f8d011683010190506001600160a01b03891660808301526001600160a01b03881660a08301526001600160a01b03871660c08301528560e0830152846101008301526123ff61012083018515159052565b8215156101408301529b9a5050505050505050505050565b6000610c493683611f28565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561246457612464612423565b500390565b80516001600160a01b03168252602081015161249060208401826001600160a01b03169052565b5060408101516124ab60408401826001600160a01b03169052565b5060608101516124c660608401826001600160a01b03169052565b5060808101516124e160808401826001600160a01b03169052565b5060a08101516124fc60a08401826001600160a01b03169052565b5060c081015161251760c08401826001600160a01b03169052565b5060e081015161253260e08401826001600160a01b03169052565b50610100818101516001600160a01b03169083015261012080820151908301526101408082015190830152610160808201519083015261018090810151910152565b60005b8381101561258f578181015183820152602001612577565b83811115610a925750506000910152565b600081518084526125b8816020860160208601612574565b601f01601f19169290920160200192915050565b602081526125de602082018351612469565b60208201516101c082015260408201516101e082015260006060830151610260806102008501526126136102808501836125a0565b91506080850151601f19808685030161022087015261263284836125a0565b935060a08701519150808685030161024087015261265084836125a0565b935060c087015191508086850301838701525061266d83826125a0565b9695505050505050565b8051611c1581611bf2565b6000610200828403121561269557600080fd5b61269d611d70565b6126a683612677565b81526126b460208401612677565b60208201526126c560408401612677565b60408201526126d660608401612677565b60608201526126e760808401612677565b60808201526126f860a08401612677565b60a082015261270960c08401612677565b60c082015261271a60e08401612677565b60e082015261010061272d818501612677565b9082015261012083810151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c080840151908201526101e0928301519281019290925250919050565b60006020828403121561279957600080fd5b5051919050565b600080858511156127b057600080fd5b838611156127bd57600080fd5b5050820193919092039150565b80356020831015610c4957600019602084900360031b1b1692915050565b600060001982036127fb576127fb612423565b5060010190565b8183823760009101908152919050565b6020815260006107ab60208301846125a0565b60006020828403121561283757600080fd5b815180151581146107ab57600080fd5b60006020828403121561285957600080fd5b815167ffffffffffffffff81111561287057600080fd5b8201601f8101841361288157600080fd5b805161288f611ef182611eaa565b8181528560208385010111156128a457600080fd5b6128b5826020830160208601612574565b95945050505050565b600082198211156128d1576128d1612423565b500190565b6000825161232a81846020870161257456fea2646970667358221220a10ae4e62b5e2c875d162cade4f208f233e835173872edec36035949495a665564736f6c634300080d0033

Deployed Bytecode

0x6080604052600436106100655760003560e01c80637d7aecd3116100435780637d7aecd3146100dd578063bfa1fc0a146100f0578063cf76d3131461011057600080fd5b806328225f0c1461006a5780632a7a70421461007f5780634f7c96b514610092575b600080fd5b61007d610078366004611c1a565b610123565b005b61007d61008d36600461200e565b6101f8565b34801561009e57600080fd5b507fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e54604080516001600160a01b039092168252519081900360200190f35b61007d6100eb36600461209c565b610362565b3480156100fc57600080fd5b5061007d61010b366004612108565b6104c7565b61007d61011e366004612125565b61059a565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b805460001901610180576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001815561018e848361067d565b610199848484610696565b604080516001600160a01b038087168252851660208201529081018390524260608201528535907fb8c86983f929c6b770461983d1bbde1870408120f07123e9c12d49f35a0b4c4b906080015b60405180910390a26000905550505050565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b805460001901610255576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001815561026c610265866121b6565b85856106bf565b602083015261027a826107b2565b5084357f438f81f3fe94456cd9d98e9073524f1c2bafb3ce75def8ced69f708061ddd5c46102ab6020880188612262565b6102bb60608a0160408b01612108565b888860008181106102ce576102ce6122c7565b90506020028101906102e091906122f6565b6102f1906060810190604001612108565b61030160a08c0160808d01612108565b885160e001518b8b600081610318576103186122c7565b905060200281019061032a91906122f6565b8a51610140810151610100909101516040516101e6999897969594936080013592916001916001600160a01b03909116151590612334565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b8054600019016103bf576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181556103e16103d660a0840160808501612108565b836101a0013561067d565b6103f26103ed83612417565b6107b2565b5082357f438f81f3fe94456cd9d98e9073524f1c2bafb3ce75def8ced69f708061ddd5c46104236020860186612262565b6104336060880160408901612108565b61044360a0880160808901612108565b61045360a08a0160808b01612108565b6104646101008a0160e08b01612108565b896101a001358a60000161014001356000806001600160a01b03168d6000016101000160208101906104969190612108565b6001600160a01b031614156040516104b79a99989796959493929190612334565b60405180910390a2600090555050565b6104cf6108ba565b6001600160a01b03811661050f576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e80546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117825560408051918252517f2ef7cbc72cbbb19695283339290d52328d612ad910a40b47fe777e67f593320e9181900360200190a15050565b7fa65bb2f450488ab0858c00edc14abc5297769bf42adb48cfb77752890e8b697b8054600019016105f7576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181556000610610610609886121b6565b87876106bf565b905061061d848483610696565b604080516001600160a01b038087168252851660208201529081018290524260608201528735907fb8c86983f929c6b770461983d1bbde1870408120f07123e9c12d49f35a0b4c4b9060800160405180910390a250600090555050505050565b61069282826001600160a01b0382161561097d565b5050565b6001600160a01b038316156106b5576106b0838383610a98565b505050565b6106b08282610ae3565b6000818082036106fb576040517f0503c3ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848461070a600182612452565b818110610719576107196122c7565b905060200281019061072b91906122f6565b61073c906080810190606001612108565b9050600061074982610bb0565b9050610756878787610c4f565b8061076083610bb0565b61076a9190612452565b9050806000036107a6576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b925050505b9392505050565b8051608001517fcb4800033539e504944b70f0275e98829f191b99c5226e9a5a072ab49d2a753e80546020840151600093916107f99183916001600160a01b031690610fe3565b60006001600160a01b03821615610811576000610817565b84602001515b83546040517fd94593720000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b039091169063d9459372908490610867908a906004016125cc565b6102006040518083038185885af1158015610886573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108ab9190612682565b61014001519695505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b0316331461097b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b565b816000036109b7576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156109f6578134146106b0576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3415610a2d576040517e3f45b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a3884610bb0565b9050610a46843330866110da565b8281610a5186610bb0565b610a5b9190612452565b14610a92576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6001600160a01b038316610ad8576040517fd1bebf0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106b0838383611166565b6001600160a01b038216610b23576040517f21f7434500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b70576040519150601f19603f3d011682016040523d82523d6000602084013e610b75565b606091505b50509050806106b0576040517f5a04673700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b03821615610c47576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610c1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c429190612787565b610c49565b475b92915050565b81818060018114610ea8576000610c66848461120f565b905060008484610c77600186612452565b818110610c8657610c866122c7565b9050602002810190610c9891906122f6565b610ca9906080810190606001612108565b90506000805b87811015610ddd5736898983818110610cca57610cca6122c7565b9050602002810190610cdc91906122f6565b9050600080610cf16040840160208501612108565b6001600160a01b0316815260208101919091526040016000205460ff168015610d435750600080610d256020840184612108565b6001600160a01b0316815260208101919091526040016000205460ff165b8015610d88575060016000610d5b60a0840184612262565b610d6a916008916000916127a0565b610d73916127ca565b815260208101919091526040016000205460ff165b610dbe576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a51610dca90826112d9565b5080610dd5816127e8565b915050610caf565b5060005b610dec600186612452565b811015610e9f576000878783818110610e0757610e076122c7565b9050602002810190610e1991906122f6565b610e2a906080810190606001612108565b9050836001600160a01b0316816001600160a01b031603610e4b5750610e8d565b848281518110610e5d57610e5d6122c7565b6020026020010151610e6e82610bb0565b610e789190612452565b92508215610e8b57610e8b813385610696565b505b80610e97816127e8565b915050610de1565b50505050610fdb565b60005b84811015610fd95736868683818110610ec657610ec66122c7565b9050602002810190610ed891906122f6565b9050600080610eed6040840160208501612108565b6001600160a01b0316815260208101919091526040016000205460ff168015610f3f5750600080610f216020840184612108565b6001600160a01b0316815260208101919091526040016000205460ff165b8015610f84575060016000610f5760a0840184612262565b610f66916008916000916127a0565b610f6f916127ca565b815260208101919091526040016000205460ff165b610fba576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8751610fc690826112d9565b5080610fd1816127e8565b915050610eab565b505b505050505050565b6001600160a01b038316610ff657505050565b6001600160a01b038216611036576040517f63ba9bff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c39190612787565b905081811015610a9257610a928484600019611572565b6001600160a01b03841661111a576040517fd1bebf0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821661115a576040517f21f7434500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a92848484846116da565b6040516001600160a01b0383166024820152604481018290526106b09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261172b565b60608160008167ffffffffffffffff81111561122d5761122d611cd0565b604051908082528060200260200182016040528015611256578160200160208202803683370190505b50905060005b828110156112d0576112a1868683818110611279576112796122c7565b905060200281019061128b91906122f6565b61129c906080810190606001612108565b610bb0565b8282815181106112b3576112b36122c7565b6020908102919091010152806112c8816127e8565b91505061125c565b50949350505050565b6112ef6112e96020830183612108565b3b151590565b611325576040517f6eefed2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101356000819003611365576040517fe46e079c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113786060850160408601612108565b9050600061138c6080860160608701612108565b9050600061139983610bb0565b905060006113a683610bb0565b905060008683106113b85760006113c2565b6113c28388612452565b90506001600160a01b03851615611404576113ed856113e760408b0160208c01612108565b89610fe3565b80156113ff576113ff853330846110da565b611408565b8695505b60008061141860208b018b612108565b6001600160a01b03168861142f60a08d018d612262565b60405161143d929190612802565b60006040518083038185875af1925050503d806000811461147a576040519150601f19603f3d011682016040523d82523d6000602084013e61147f565b606091505b5091509150816114ca5760006114948261182a565b9050806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729190612812565b7f7bfdfdb5e3a3776976e53cb0607060f54c5312701c8cba1155cc4d5394440b388b6114f960208d018d612108565b61150960608e0160408f01612108565b898d896115158d610bb0565b61151f9190612452565b604080519687526001600160a01b0395861660208801529385169386019390935292166060840152608083019190915260a08201524260c082015260e00160405180910390a15050505050505050505050565b80158061160557506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156115df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116039190612787565b155b611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610972565b6040516001600160a01b0383166024820152604481018290526106b09084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016111ab565b6040516001600160a01b0380851660248301528316604482015260648101829052610a929085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016111ab565b6000611780826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118a19092919063ffffffff16565b8051909150156106b0578080602001905181019061179e9190612825565b6106b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610972565b606060448251101561186f57505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600061188b60048085516118839190612452565b8591906118b8565b9050808060200190518101906107ab9190612847565b60606118b08484600085611a13565b949350505050565b6060816118c681601f6128be565b101561192e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610972565b61193882846128be565b845110156119a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610972565b6060821580156119c157604051915060008252602082016040526112d0565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119fa5780518352602092830192016119e2565b5050858452601f01601f19166040525050949350505050565b606082471015611aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610972565b843b611b0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610972565b600080866001600160a01b03168587604051611b2991906128d6565b60006040518083038185875af1925050503d8060008114611b66576040519150601f19603f3d011682016040523d82523d6000602084013e611b6b565b606091505b5091509150611b7b828286611b86565b979650505050505050565b60608315611b955750816107ab565b825115611ba55782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729190612812565b60006101008284031215611bec57600080fd5b50919050565b6001600160a01b0381168114611c0757600080fd5b50565b8035611c1581611bf2565b919050565b60008060008060808587031215611c3057600080fd5b843567ffffffffffffffff811115611c4757600080fd5b611c5387828801611bd9565b9450506020850135611c6481611bf2565b92506040850135611c7481611bf2565b9396929550929360600135925050565b60008083601f840112611c9657600080fd5b50813567ffffffffffffffff811115611cae57600080fd5b6020830191508360208260051b8501011115611cc957600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff81118282101715611d2357611d23611cd0565b60405290565b60405160e0810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051610100810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051610200810167ffffffffffffffff81118282101715611d2357611d23611cd0565b604051601f8201601f1916810167ffffffffffffffff81118282101715611dbd57611dbd611cd0565b604052919050565b60006101a08284031215611dd857600080fd5b611de0611cff565b9050611deb82611c0a565b8152611df960208301611c0a565b6020820152611e0a60408301611c0a565b6040820152611e1b60608301611c0a565b6060820152611e2c60808301611c0a565b6080820152611e3d60a08301611c0a565b60a0820152611e4e60c08301611c0a565b60c0820152611e5f60e08301611c0a565b60e0820152610100611e72818401611c0a565b908201526101208281013590820152610140808301359082015261016080830135908201526101809182013591810191909152919050565b600067ffffffffffffffff821115611ec457611ec4611cd0565b50601f01601f191660200190565b600082601f830112611ee357600080fd5b8135611ef6611ef182611eaa565b611d94565b818152846020838601011115611f0b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006102608284031215611f3b57600080fd5b611f43611d29565b9050611f4f8383611dc5565b81526101a082013560208201526101c082013560408201526101e082013567ffffffffffffffff80821115611f8357600080fd5b611f8f85838601611ed2565b6060840152610200840135915080821115611fa957600080fd5b611fb585838601611ed2565b6080840152610220840135915080821115611fcf57600080fd5b611fdb85838601611ed2565b60a0840152610240840135915080821115611ff557600080fd5b5061200284828501611ed2565b60c08301525092915050565b6000806000806060858703121561202457600080fd5b843567ffffffffffffffff8082111561203c57600080fd5b61204888838901611bd9565b9550602087013591508082111561205e57600080fd5b61206a88838901611c84565b9095509350604087013591508082111561208357600080fd5b5061209087828801611f28565b91505092959194509250565b600080604083850312156120af57600080fd5b823567ffffffffffffffff808211156120c757600080fd5b6120d386838701611bd9565b935060208501359150808211156120e957600080fd5b50830161026081860312156120fd57600080fd5b809150509250929050565b60006020828403121561211a57600080fd5b81356107ab81611bf2565b60008060008060006080868803121561213d57600080fd5b853567ffffffffffffffff8082111561215557600080fd5b61216189838a01611bd9565b9650602088013591508082111561217757600080fd5b5061218488828901611c84565b909550935050604086013561219881611bf2565b915060608601356121a881611bf2565b809150509295509295909350565b600061010082360312156121c957600080fd5b6121d1611d4c565b82358152602083013567ffffffffffffffff8111156121ef57600080fd5b6121fb36828601611ed2565b60208301525061220d60408401611c0a565b604082015261221e60608401611c0a565b606082015261222f60808401611c0a565b608082015261224060a08401611c0a565b60a082015260c083013560c082015260e083013560e082015280915050919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261229757600080fd5b83018035915067ffffffffffffffff8211156122b257600080fd5b602001915036819003821315611cc957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261232a57600080fd5b9190910192915050565b6000610160808352600481840152507f6e787470000000000000000000000000000000000000000000000000000000006101808301526101a0806020840152600081840152506101c08060408401528b81840152506101e08b8d8285013760008c84018201526001600160a01b038b166060840152601f19601f8d011683010190506001600160a01b03891660808301526001600160a01b03881660a08301526001600160a01b03871660c08301528560e0830152846101008301526123ff61012083018515159052565b8215156101408301529b9a5050505050505050505050565b6000610c493683611f28565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561246457612464612423565b500390565b80516001600160a01b03168252602081015161249060208401826001600160a01b03169052565b5060408101516124ab60408401826001600160a01b03169052565b5060608101516124c660608401826001600160a01b03169052565b5060808101516124e160808401826001600160a01b03169052565b5060a08101516124fc60a08401826001600160a01b03169052565b5060c081015161251760c08401826001600160a01b03169052565b5060e081015161253260e08401826001600160a01b03169052565b50610100818101516001600160a01b03169083015261012080820151908301526101408082015190830152610160808201519083015261018090810151910152565b60005b8381101561258f578181015183820152602001612577565b83811115610a925750506000910152565b600081518084526125b8816020860160208601612574565b601f01601f19169290920160200192915050565b602081526125de602082018351612469565b60208201516101c082015260408201516101e082015260006060830151610260806102008501526126136102808501836125a0565b91506080850151601f19808685030161022087015261263284836125a0565b935060a08701519150808685030161024087015261265084836125a0565b935060c087015191508086850301838701525061266d83826125a0565b9695505050505050565b8051611c1581611bf2565b6000610200828403121561269557600080fd5b61269d611d70565b6126a683612677565b81526126b460208401612677565b60208201526126c560408401612677565b60408201526126d660608401612677565b60608201526126e760808401612677565b60808201526126f860a08401612677565b60a082015261270960c08401612677565b60c082015261271a60e08401612677565b60e082015261010061272d818501612677565b9082015261012083810151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c080840151908201526101e0928301519281019290925250919050565b60006020828403121561279957600080fd5b5051919050565b600080858511156127b057600080fd5b838611156127bd57600080fd5b5050820193919092039150565b80356020831015610c4957600019602084900360031b1b1692915050565b600060001982036127fb576127fb612423565b5060010190565b8183823760009101908152919050565b6020815260006107ab60208301846125a0565b60006020828403121561283757600080fd5b815180151581146107ab57600080fd5b60006020828403121561285957600080fd5b815167ffffffffffffffff81111561287057600080fd5b8201601f8101841361288157600080fd5b805161288f611ef182611eaa565b8181528560208385010111156128a457600080fd5b6128b5826020830160208601612574565b95945050505050565b600082198211156128d1576128d1612423565b500190565b6000825161232a81846020870161257456fea2646970667358221220a10ae4e62b5e2c875d162cade4f208f233e835173872edec36035949495a665564736f6c634300080d0033

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

Txn 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.