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

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

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

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