Skip to main content
Version: 0.96.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:123

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

Param

Source chain instance.

Param

Destination chain instance.

Param

OnRamp contract address on source chain.

Param

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
  • executeReport - Execute on destination chain
  • getExecutionReceipts - Check execution status