CCIPLocalSimulatorFork.sol API
API methods
[CCIPLocalSimulatorFork].switchChainAndRouteMessage()
switchChainAndRouteMessage()
To be called after the sending of the cross-chain message (ccipSend
). Goes through the list of past logs and looks for the CCIPSendRequested
event. Switches to a destination network fork. Routes the sent cross-chain message on the destination network.
Parameters:
forkId
(uint256) - The ID of the destination network fork. This is the returned value ofcreateFork()
orcreateSelectFork()
[CCIPLocalSimulatorFork].requestLinkFromFaucet()
requestLinkFromFaucet()
Requests LINK tokens from the faucet. The provided amount of tokens are transferred to provided destination address.
Parameters:
to
(address): The address to which LINK tokens are to be sent.amount
(uint256): The amount of LINK tokens to send.
Return values:
success
(bool): Returnstrue
if the transfer of tokens was successful, otherwisefalse
.
[CCIPLocalSimulatorFork].getNetworkDetails()
getNetworkDetails()
Returns the default values for currently CCIP supported networks. If network is not present or some of the values are changed, user can manually add new network details using the setNetworkDetails
function.
Parameters:
chainId
(uint256) - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. Not CCIP chain selector.
Return values:
Tuple containing:
chainSelector
(uint64) - The unique CCIP Chain Selector.routerAddress
(address) - The address of the CCIP Router contract.linkAddress
(address) - The address of the LINK token.wrappedNativeAddress
(address) - The address of the wrapped native token that can be used for CCIP fees.ccipBnMAddress
(address) - The address of the CCIP BnM token.ccipLnMAddress
(address) - The address of the CCIP LnM token.
[CCIPLocalSimulatorFork].setNetworkDetails()
setNetworkDetails()
If network details are not present or some of the values are changed, user can manually add new network details using the setNetworkDetails
function.
Parameters:
chainId
(uint256) - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. Not CCIP chain selector.Tuple containing:
chainSelector
(uint64) - The unique CCIP Chain Selector.routerAddress
(address) - The address of the CCIP Router contract.linkAddress
(address) - The address of the LINK token.wrappedNativeAddress
(address) - The address of the wrapped native token that can be used for CCIP fees.ccipBnMAddress
(address) - The address of the CCIP BnM token.ccipLnMAddress
(address) - The address of the CCIP LnM token.
Last updated