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
  • CurveSettings:
  • Amm
  • AppStorage
  1. Developers
  2. Deprecated Magpie Contracts
  3. MagpieAggregator Diamond Proxy
  4. Libraries

LibMagpieRouter

This library declared struct and a library used by MagpieAggregator. This structure and library design help organize data and provide access to the app's storage, allowing other parts of the system to fetch essential data or settings as needed.

CurveSettings:

struct CurveSettings {
    address mainRegistry;
    address cryptoRegistry;
    address cryptoFactory;
}
Field
Type
Description

Address for the main Curve registry.

Address for the crypto Curve registry.

Address for the crypto Curve factory.

Amm

struct Amm {
    uint8 protocolId;
    bytes4 selector;
    address addr;
}
Field
Type
Description

An identifier for the AMM protocol.

A function selector.

The address where this AMM resides.

AppStorage

struct AppStorage {
    address weth;
    address magpieAggregatorAddress;
    mapping(uint16 => Amm) amms;
    CurveSettings curveSettings;
}
Field
Type
Description

The address of the Wrapped Ether contract.

Address of the Magpie Aggregator contract.

A mapping of different AMMs, indexed by a uint16 value.

Last updated 1 year ago

👩‍💻
mainRegistry
address
cryptoRegistry
address
cryptoFactory
address
protocolId
uint8
selector
bytes4
addr
address
weth
address
magpieAggregatorAddress
address
amms
mapping(uint16 => Amm)
curveSettings
CurveSettings
struct CurveSettings {
    address mainRegistry;
    address cryptoRegistry;
    address cryptoFactory;
}