AggregatorFacet
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.
updateWeth()
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
updateMagpieRouterAddress()
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
updateNetworkId()
The purpose of this function is to allow the contract owner to update the network ID used in the aggregator contract.
Input
addMagpieAggregatorAddresses()
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
swapIn()
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
swapOut()
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
getDeposit()
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
withdraw()
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
getDepositByUser()
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
isTransferKeyUsed()
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
Last updated