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
mainRegistryaddressAddress for the main Curve registry.
cryptoRegistryaddressAddress for the crypto Curve registry.
cryptoFactoryaddressAddress for the crypto Curve factory.
Amm
struct Amm {
uint8 protocolId;
bytes4 selector;
address addr;
}Field
Type
Description
protocolIduint8An identifier for the AMM protocol.
selectorbytes4A function selector.
addraddressThe address where this AMM resides.
AppStorage
struct AppStorage {
address weth;
address magpieAggregatorAddress;
mapping(uint16 => Amm) amms;
CurveSettings curveSettings;
}Field
Type
Description
wethaddressThe address of the Wrapped Ether contract.
magpieAggregatorAddressaddressAddress of the Magpie Aggregator contract.
ammsmapping(uint16 => Amm)A mapping of different AMMs, indexed by a uint16 value.
curveSettingsCurveSettingsstruct CurveSettings {
address mainRegistry;
address cryptoRegistry;
address cryptoFactory;
}Last updated