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

function linkToken() external view returns (address)

Return Values

NameTypeDescription

linkToken

address

address of LINK token

sdlToken

Returns the address of the SDL token

function sdlToken() external view returns (address)

Return Values

NameTypeDescription

sdlToken

address

address of SDL token

sdlPool

Returns the address of the SDL pool

function sdlPool() external view returns (address)

Return Values

NameTypeDescription

sdlPool

address

address of SDL pool

sdlPoolCCIPController

Returns the address of the SDL pool CCIP controller

function sdlPoolCCIPController() external view returns (address)

Return Values

NameTypeDescription

sdlPoolCCIPController

address

address of SDL pool CCIP controller

extraArgsByChain

Returns the CCIP extra args used to send a transfer to a destination chain

function extraArgsByChain(uint64 _chainSelector) external view returns (bytes)

Parameters

NameTypeDescription

_chainSelector

uint64

id of chain

Return Values

NameTypeDescription

extraArgs

bytes

extra args

getFee

Returns the current fee for an reSDL transfer

function getFee(uint64 _destinationChainSelector, bool _payNative) external payable returns (uint256)

Parameters

NameTypeDescription

_destinationChainSelector

uint64

id of destination chain

_payNative

bool

whether fee should be paid natively or with LINK

Return Values

NameTypeDescription

fee

uint256

current fee

Write Functions

transferRESDL

Transfers an reSDL token to a destination chain

function transferRESDL(
        uint64 _destinationChainSelector,
        address _receiver,
        uint256 _tokenId,
        bool _payNative,
        uint256 _maxLINKFee
    ) external payable returns (bytes32 messageId)

Parameters

NameTypeDescription

_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

NameTypeDescription

messageId

bytes32

id of CCIP message

setExtraArgs

Sets the extra args used for sending reSDL to a destination chain

function setExtraArgs(uint64 _destinationChainSelector, bytes _extraArgs) external

Parameters

NameTypeDescription

_destinationChainSelector

uint64

id of destination chain

_extraArgs

bytes

extra args as defined in CCIP API

ccipReceive

Processes a received CCIP message

function ccipReceive(struct Client.Any2EVMMessage _message) external

Parameters

NameTypeDescription

_message

Any2EVMMessage

CCIP message

Last updated