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
  • onlyMagpieAggregator:
  • onlyCeler:
  • updateSettings():
  • deposit():
  • withdraw():
  • executeMessageWithTransfer():
  • executeMessageWithTransferRefund():
  1. Developers
  2. Deprecated Magpie Contracts

MagpieCelerBridge

MagpieCelerBridge, which serves as an intermediary to handle deposits, withdrawals, and refunds of assets between Magpie Aggregator and Celer Network.

It has two modifiers:

onlyMagpieAggregator:

Restricts functions to only be called by the Magpie Aggregator.

onlyCeler:

Restricts functions to only be called by the Celer Network.

It contains the following functions:

updateSettings():

Allows the owner to update the contract settings.

Input

Field
Type
Description

deposit():

Handles the deposit process by receiving funds, approving tokens, sending them to the liquidity bridge, and notifying the message bus.

Input

withdraw():

Handles withdrawal requests from deposited amounts.

Input

Field
Type
Description

Output

Field
Type
Description

The withdrawal amount

executeMessageWithTransfer():

Receives transfers and updates the deposited amounts accordingly.

Input

Field
Type
Description

Output

Field
Type
Description

executeMessageWithTransferRefund():

Manages refunds to the designated recipient.

Input

Field
Type
Description

Output

Field
Type
Description

Last updated 1 year ago

👩‍💻
_settings
Settings
struct Settings {
        address aggregatorAddress;
        address messageBusAddress;
    }
depositArgs
DepositArgs
struct DepositArgs {
        uint32 slippage;
        uint64 chainId;
        uint256 amount;
        address sender;
        address receiver;
        address assetAddress;
        TransferKey transferKey;
    }
withdrawArgs
WithdrawArgs
struct WithdrawArgs {
        address assetAddress;
        TransferKey transferKey;
    }
amount
uint256
address
assetAddress
address
amount
uint256
uint64
payload
bytes
address
IMessageBus.TxStatus
enum TxStatus {
        Null,
        Success,
        Fail,
        Fallback,
        Pending 
    }
assetAddress
address
amount
uint256
payload
bytes
address
IMessageBus.TxStatus
enum TxStatus {
        Null,
        Success,
        Fail,
        Fallback,
        Pending 
    }