SDL Pool CCIP Controller Primary

The SDLPoolCCIPControllerPrimary acts as an interface between the PrimarySDLPool and secondary chains by handling CCIP messaging.

This contract is deployed only on the primary chain.

View Functions

getRouter

Returns the current CCIP router

function getRouter() public view returns (address)

Return Values

linkToken

Returns the address of the LINK token

function linkToken() external view returns (address)

Return Values

sdlToken

Returns the address of the SDL token

function sdlToken() external view returns (address)

Return Values

sdlPool

Returns the address of the SDL pool

function sdlPool() external view returns (address)

Return Values

reSDLTokenBridge

Returns the address of the reSDL bridge

function reSDLTokenBridge() external view returns (address)

Return Values

maxLINKFee

Returns the maximum CCIP fee in LINK to be paid on outgoing messages

function maxLINKFee() external view returns (uint256)

Return Values

whitelistedDestinations

Returns the destination address for a whitelisted chain

function whitelistedDestinations(uint64 _chainSelector) external view returns (address)

Parameters

Return Values

updateExtraArgsByChain

Returns the CCIP extra args for sending updates for a whitelisted chain

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

Parameters

Return Values

rewardsExtraArgsByChain

Returns the CCIP extra args for sending rewards for a whitelisted chain

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

Parameters

Return Values

reSDLSupplyByChain

Returns the total reSDL supply on a whitelisted chain

function reSDLSupplyByChain(uint64 _chainSelector) external view returns (uint256)

Parameters

Return Values

wrappedRewardTokens

Returns the wrapper token for a reward token

function wrappedRewardTokens(address _token) external view returns (address)

Parameters

Return Values

rewardsInitiator

Returns the address of the rewards initator

function rewardsInitiator() external view returns (address)

Return Values

getWhitelistedChains

Returns a list of all whitelisted chains

function getWhitelistedChains() external view returns (uint64[])

Return Values

Write Functions

setRouter

Sets the CCIP router

function setRouter(address _router) external

Parameters

handleOutgoingRESDL

Handles the outgoing transfer of an reSDL token to another chain

function handleOutgoingRESDL(uint64 _destinationChainSelector, address _sender, uint256 _tokenId) external virtual returns (address, struct ISDLPool.RESDLToken)

Parameters

Return Values

handleIncomingRESDL

Handles the incoming transfer of an reSDL token from another chain

function handleIncomingRESDL(uint64 _sourceChainSelector, address _receiver, uint256 _tokenId, struct ISDLPool.RESDLToken _reSDLToken) external virtual

Parameters

ccipSend

Sends a CCIP message

function ccipSend(uint64 _destinationChainSelector, struct Client.EVM2AnyMessage _evmToAnyMessage) external payable returns (bytes32)

Parameters

ccipReceive

Processes a received CCIP message

function ccipReceive(struct Client.Any2EVMMessage _message) external

Parameters

recoverTokens

Withdraws tokens held by this contract

function recoverTokens(address[] _tokens, uint256[] _amounts, address _receiver) external

Parameters

setMaxLINKFee

Sets the maximum LINK fee to be paid on an outgoing CCIP message

function setMaxLINKFee(uint256 _maxLINKFee) external

Parameters

setRESDLTokenBridge

Sets the address of the reSDL token bridge

function setRESDLTokenBridge(address _reSDLTokenBridge) external

Parameters

distributeRewards

Claims and distributes rewards between all secondary chains

function distributeRewards() external

addWhitelistedChain

Whitelists a new chain

function addWhitelistedChain(uint64 _chainSelector, address _destination, bytes _updateExtraArgs, bytes _rewardsExtraArgs) external

Parameters

removeWhitelistedChain

Removes an existing whitelisted chain

function removeWhitelistedChain(uint64 _chainSelector) external

Parameters

approveRewardTokens

Approves the CCIP router to transfer tokens on behalf of this contract

function approveRewardTokens(address[] _tokens) external

Parameters

setWrappedRewardToken

Sets the wrapped token address for a reward token

function setWrappedRewardToken(address _token, address _wrappedToken) external

Parameters

setUpdateExtraArgs

Sets the extra args used for sending updates to a chain

function setUpdateExtraArgs(uint64 _chainSelector, bytes _updateExtraArgs) external

Parameters

setRewardsExtraArgs

Sets the extra args used for sending rewards to a chain

function setRewardsExtraArgs(uint64 _chainSelector, bytes _rewardsExtraArgs) external

Parameters

setRewardsInitiator

Sets the rewards initiator

function setRewardsInitiator(address _rewardsInitiator) external

Parameters

Last updated