AggregatorFacet
Last updated
Last updated
The AggregatorFacet
contract serves as the implementation of the IAggregator
interface. It provides functions for updating settings, performing swaps, managing deposits, retrieving payloads, and checking transfer key usage. The functions enforce necessary checks and interact with the underlying LibAggregator
library to execute the operations.
The purpose of this function is to allow the contract owner to update the address of the WETH token used in the aggregator contract.
Input
Field | Type | Description |
---|---|---|
the updateMagpieRouterAddress
function is a straightforward administrative function that allows the contract owner to update a critical component of the system, in this case, the address of the Magpie Router.
Input
Field | Type | Description |
---|---|---|
The purpose of this function is to allow the contract owner to update the network ID used in the aggregator contract.
Input
Field | Type | Description |
---|---|---|
The purpose of this function is to allow the contract owner to add Magpie aggregator addresses for multiple network IDs in the aggregator contract.
Input
this function is responsible for executing a swap-in operation. It enforces various checks such as the deadline, pausing status, and custom guards.
Input
Output
this function is responsible for executing a swap-out operation. It enforces various checks such as the deadline, pausing status, and custom guards.
Input
Output
The purpose of this function is to allow external callers to retrieve the deposit amount for a specific asset in the aggregator contract.
Input
Output
The purpose of this function is to allow external callers to initiate the withdrawal of funds from the aggregator contract for a specific asset.
Input
The purpose of this function is to allow external callers to retrieve the deposit amount for a specific asset deposited by a specific user in the aggregator contract.
Input
Output
The purpose of this function is to allow external callers to check if a specific transfer key has been used in the aggregator contract.
Input
Output
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Address of wrapped native address (WETH for Ethereum, WMATIC for Polygon etc.)
This new address is the updated address for the Magpie Router within the contract.
networkId of the current chain in Magpie protocol, it is different from the actual networkId ethereum: 1 polygon: 2 bsc: 3 avalanche: 4 arbitrum: 5 optimism: 6
networkIds of the networks we want to add
Address of MagpieAggregator contracts on the specified chains/networks
SwapInArgs is a struct, its explained here
amountOut that you will receive after swapping tokens
SwapOutArgs is a struct, its explained here
amountOut that you will receive after swapping tokens
Address of the token for which you want to query deposit
It returns the amount of deposited assets
Address of the token which will be withdrawn
the address of the asset whose deposited amount needs to be retrieved
the address of the user who has deposited the asset
amount
the deposited amount
the source network identifier provided by the magpie team for each bloackchain
the address of the user
the sequence stored in our data base
True if the key has been used false if not