Skip to main content
Version: 1.14.0

Variable: discoverOffRamp

const discoverOffRamp: Memoized<(source: Chain, dest: Chain, onRamp: string, __namedParameters: WithLogger) => Promise<string>, { transformKey: (__namedParameters: [Chain<ChainFamily>, Chain<ChainFamily>, string, WithLogger?]) => [bigint, bigint, string]; }>

Defined in: execution.ts:115

Discover the OffRamp address for a given OnRamp and destination chain. Results are memoized for performance.

Param​

source

Source chain instance.

Param​

dest

Destination chain instance.

Param​

onRamp

OnRamp contract address on source chain.

Param​

ctx

Optional context with logger.

Returns​

OffRamp address on destination chain.

Throws​

CCIPOffRampNotFoundError - When no matching OffRamp is found for the OnRamp

Example​

TypeScript
import { discoverOffRamp, EVMChain } from '@chainlink/ccip-sdk'

const source = await EVMChain.fromUrl('https://rpc.sepolia.org')
const dest = await EVMChain.fromUrl('https://rpc.fuji.avax.network')

const offRamp = await discoverOffRamp(source, dest, onRampAddress)
console.log('OffRamp on destination:', offRamp)

See​

  • calculateManualExecProof - Use with OffRamp for manual execution
  • execute - Execute on destination chain
  • getExecutionReceipts - Check execution status