CCIPLocalSimulator.sol API
API methods
[CCIPLocalSimulator].configuration()
configuration()
Call the .configuration()
method on the deployed CCIPLocalSimulator
contract to obtain the configuration details for pre-deployed contracts and services needed for local CCIP simulations.
Return values:
chainSelector_
(uint64): The unique CCIP Chain Selector.sourceRouter_
(IRouterClient): The source chain Router contract.destinationRouter_
(IRouterClient): The destination chain Router contract.wrappedNative_
(WETH9): The wrapped native token which can be used for CCIP fees.linkToken_
(LinkToken): The LINK token.ccipBnM_
(BurnMintERC677Helper): The ccipBnM token.ccipLnM_
(BurnMintERC677Helper): The ccipLnM token.
[CCIPLocalSimulator].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
.
[CCIPLocalSimulator].getSupportedTokens()
getSupportedTokens()
Gets a list of token addresses that are supported for cross-chain transfers by the simulator.
Parameters:
chainSelector
(uint64): The unique CCIP Chain Selector.
Return values:
tokens
(address[]): Returns a list of token addresses that are supported for cross-chain transfers by the simulator.
[CCIPLocalSimulator].isChainSupported()
isChainSupported()
Checks whether the provided chainSelector
is supported by the simulator.
Parameters:
chainSelector
(uint64): The unique CCIP Chain Selector.
Return values:
supported
(bool): Returns true ifchainSelector
is supported by the simulator.
[CCIPLocalSimulator].supportNewToken()
supportNewToken()
Allows user to support any new token, besides CCIP BnM and CCIP LnM, for cross-chain transfers.
Parameters:
tokenAddress
(address): The address of the token to add to the list of supported tokens.
Last updated