MagpieStargateBridgeV2
Similar to MagpieStargateBridge but the router address of the bridge has changed.
Field | Type | Description |
---|---|---|
Magpie Aggregator Address | ||
Stargate Router Address |
Field | Type | Description |
---|---|---|
A | ||
A | ||
An | ||
A | ||
An instance of the |
updateSettings():
to update the bridge settings. Only the contract owner can call this function.
Input:
Field | Type | Description |
---|---|---|
withdraw():
to withdraw deposited funds. It checks the deposited amount based on the transfer key and asset address, clears the cached swap if the amount is zero, and transfers the amount to the aggregator address. Only the Magpie aggregator can call this function.
Input:
Field | Type | Description |
---|---|---|
Output:
Field | Type | Description |
---|---|---|
The amount that is withdrawn. |
sgReceive():
sgReceive
is called by the Stargate router when assets are received from another chain. It increments the deposited amount based on the transfer key, asset address, and amount.
Input:
Field | Type | Description |
---|---|---|
Network Id extracted from the TransferKey struct | ||
Sender Address extracted from the TransferKey struct | ||
Swap Sequence extracted from the TransferKey struct | ||
An | ||
A | ||
A |
Last updated