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

mainRegistry

address

Address for the main Curve registry.

cryptoRegistry

address

Address for the crypto Curve registry.

cryptoFactory

address

Address for the crypto Curve factory.

Amm

struct Amm {
    uint8 protocolId;
    bytes4 selector;
    address addr;
}
FieldTypeDescription

protocolId

uint8

An identifier for the AMM protocol.

selector

bytes4

A function selector.

addr

address

The address where this AMM resides.

AppStorage

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

weth

address

The address of the Wrapped Ether contract.

magpieAggregatorAddress

address

Address of the Magpie Aggregator contract.

amms

mapping(uint16 => Amm)

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

curveSettings

CurveSettings

struct CurveSettings {
    address mainRegistry;
    address cryptoRegistry;
    address cryptoFactory;
}

Last updated