Type alias RouteDescription

RouteDescription: {
    amount: bigint;
    channelId: string;
    fromAsset: string;
    fromChainId: string;
    messageVerifyGasCost: bigint;
    minOut: bigint;
    priceOfAckGas: bigint;
    priceOfDeliveryGas: bigint;
    refundGasTo: string;
    route: RouteDetails;
    targetDelta: bigint;
    toAccount: string;
    toAsset: string;
    toAssetIndex: number;
    toChainId: string;
    underwritingIncentive: bigint | undefined;
}

Encodes a sendAsset into the routers calldata.

Type declaration

  • amount: bigint
  • channelId: string
  • fromAsset: string
  • fromChainId: string
  • messageVerifyGasCost: bigint
  • minOut: bigint
  • priceOfAckGas: bigint
  • priceOfDeliveryGas: bigint
  • refundGasTo: string
  • route: RouteDetails
  • targetDelta: bigint
  • toAccount: string
  • toAsset: string
  • toAssetIndex: number
  • toChainId: string
  • underwritingIncentive: bigint | undefined

Param: messageVerifyGasCost

The cost to verify a message by the underlying messaging protocol. Can be found by calling the CCI on estimateAdditionalCost.

Param: priceOfDeliveryGas

What is the (wei) cost of gas on the destination chain? Can be found by getting the gas cost on the destination chain (in wei) and converting it into source chain (in wei).

Param: priceOfAckGas

What is the (wei) cost of gas on the source chain. Should be set slightly higher than base gas. (otherwise tx fails.)

Param: targetDelta

The estimated time to verify the message. Should be set slightly longer.

Param: refundGasTo

Who should the excess gas (on ack) be refunded to? !Set to an address! Which should likely to be the sender or origin of the transaction.