reSDL Token Bridge
The RESDLTokenBridge
enables users to transfer reSDL positions between chains using CCIP. This contract interfaces with SDLPoolCCIPControllerPrimary
and SDLPoolCCIPControllerSecondary
to handle incoming and outgoing CCIP messages on both primary and secondary chains.
View Functions
linkToken
Returns the address of the LINK token
Return Values
Name | Type | Description |
---|---|---|
linkToken | address | address of LINK token |
sdlToken
Returns the address of the SDL token
Return Values
Name | Type | Description |
---|---|---|
sdlToken | address | address of SDL token |
sdlPool
Returns the address of the SDL pool
Return Values
Name | Type | Description |
---|---|---|
sdlPool | address | address of SDL pool |
sdlPoolCCIPController
Returns the address of the SDL pool CCIP controller
Return Values
Name | Type | Description |
---|---|---|
sdlPoolCCIPController | address | address of SDL pool CCIP controller |
extraArgsByChain
Returns the CCIP extra args used to send a transfer to a destination chain
Parameters
Name | Type | Description |
---|---|---|
_chainSelector | uint64 | id of chain |
Return Values
Name | Type | Description |
---|---|---|
extraArgs | bytes | extra args |
getFee
Returns the current fee for an reSDL transfer
Parameters
Name | Type | Description |
---|---|---|
_destinationChainSelector | uint64 | id of destination chain |
_payNative | bool | whether fee should be paid natively or with LINK |
Return Values
Name | Type | Description |
---|---|---|
fee | uint256 | current fee |
Write Functions
transferRESDL
Transfers an reSDL token to a destination chain
Parameters
Name | Type | Description |
---|---|---|
_destinationChainSelector | uint64 | id of destination chain |
_receiver | address | address to receive reSDL on destination chain |
_tokenId | uint256 | id of reSDL token |
_payNative | bool | whether fee should be paid natively or with LINK |
_maxLINKFee | uint256 | call will revert if LINK fee exceeds this value |
Return Values
Name | Type | Description |
---|---|---|
messageId | bytes32 | id of CCIP message |
setExtraArgs
Sets the extra args used for sending reSDL to a destination chain
Parameters
Name | Type | Description |
---|---|---|
_destinationChainSelector | uint64 | id of destination chain |
_extraArgs | bytes | extra args as defined in CCIP API |
ccipReceive
Processes a received CCIP message
Parameters
Name | Type | Description |
---|---|---|
_message | Any2EVMMessage | CCIP message |
Last updated