Magpie Protocol
  • Magpie Protocol
    • What is Magpie solving?
      • What is DeFi?
    • Magpies Key Features
      • Use Cases
    • FLY
      • xFLY & FLY33
  • 📶Supported Networks
  • Guides
    • 📖Glossary of DeFi Terms
    • 👜Connect Wallet
    • 🔄On-Chain Swap
    • 🔀Cross-Chain Swap
    • 🔂Swap configuration
    • 🥚Magpie Boosts
    • 📒Transaction History
    • 💲Portfolio
  • Media Kit
  • 👩‍💻Developers
    • Magpie Contracts
      • MagpieCCTPBridge
      • MagpieCelerBridgeV2
      • MagpieRouterV3
      • MagpieStargateBridgeV3
      • LibAsset
      • LibBridge
      • LibRouter
    • Smart Contracts Audit
    • Deployments
    • API Reference
      • On chain swap
      • Cross chain swap
      • Requesting and Using API Key
Powered by GitBook
On this page
  1. Developers
  2. Deprecated Magpie Contracts
  3. MagpieAggregator Diamond Proxy
  4. Data Transfer

Interface - IDataTransfer



interface IDataTransfer {
    event UpdateLayerZeroSettings(address indexed sender, LayerZeroSettings layerZeroSettings);

    /// @dev Allows the contract owner to update the LayerZero settings
    /// @param layerZeroSettings LayerZero related parameters.
    function updateLayerZeroSettings(LayerZeroSettings calldata layerZeroSettings) external;

    event AddLayerZeroChainIds(address indexed sender, uint16[] networkIds, uint16[] chainIds);

    /// @dev Allows the contract owner to add LayerZero chain ids to the corresponding magpie network ids.
    /// @param networkIds An array containing identifiers for Magpie networks.
    /// @param chainIds An array containing chain identifiers corresponding to the network ids.
    function addLayerZeroChainIds(uint16[] calldata networkIds, uint16[] calldata chainIds) external;

    event AddLayerZeroNetworkIds(address indexed sender, uint16[] chainIds, uint16[] networkIds);

    /// @dev Allows the contract owner to add Magpie network ids to the corresponding LayerZero chain ids.
    /// @param chainIds An array containing chain identifiers corresponding to the network ids.
    /// @param networkIds An array containing identifiers for Magpie networks.
    function addLayerZeroNetworkIds(uint16[] calldata chainIds, uint16[] calldata networkIds) external;

    event UpdateWormholeSettings(address indexed sender, WormholeSettings wormholeSettings);

    /// @dev Allows the contract owner to update the settings required for interaction with Wormhole.
    /// @param wormholeSettings Wormhole related parameters.
    function updateWormholeSettings(WormholeSettings calldata wormholeSettings) external;

    event AddWormholeNetworkIds(address indexed sender, uint16[] chainIds, uint16[] networkIds);

    /// @dev Allows the contract owner to add Magpie network ids to the corresponding Wormhole chain ids.
    /// @param chainIds An array containing chain identifiers corresponding to the network ids.
    /// @param networkIds An array containing identifiers for Magpie networks.
    function addWormholeNetworkIds(uint16[] calldata chainIds, uint16[] calldata networkIds) external;

    /// @dev Retrieves the Wormhole core sequence.
    /// @param transferKeyCoreSequence Magpie transferKey sequence that is generated for each crosschain swap.
    function getWormholeCoreSequence(uint64 transferKeyCoreSequence) external view returns (uint64);

    event LzReceive(TransferKey transferKey, bytes payload);

    /// @dev Allows LayerZero to send message corresponding to a specific crosschain swap.
    /// @param senderChainId The LayerZero chain identifier for the source chain.
    /// @param senderAddress The address of the origin contract.
    /// @param nonce Unique identifier for the message.
    /// @param extendedPayload Payload of the specific crosschain swap.
    function lzReceive(
        uint16 senderChainId,
        bytes calldata senderAddress,
        uint64 nonce,
        bytes calldata extendedPayload
    ) external;

    /// @dev Sends swap data to a data transfer protocol
    function dataTransferIn(DataTransferInArgs calldata dataTransferInArgs) external payable;

    /// @dev Recives swap data from a data transfer protocol
    function dataTransferOut(
        DataTransferOutArgs calldata dataTransferOutArgs
    ) external payable returns (TransferKey memory, bytes memory);
}

```

Last updated 1 year ago

👩‍💻