Skip to main content
Hyperlane Warp Routes (HWR) implement the ITokenBridge interface.

Fee Quoting Interface

New in version 10.0.0: The quoteTransferRemote function provides a standardized way to quote fees for warp route transfers. Only applicable to routes that return >= 10.0.0 from PACKAGE_VERSION().

Quote Structure

The quoteTransferRemote function returns an array of Quote structs with the following convention:
  1. Index 0: Native Fees
    • Token: address(0) (native token like ETH, MATIC, etc.)
    • Amount: Fees charged by the mailbox for dispatching the message
    • This must be sent as msg.value when calling transferRemote
  2. Index 1: Token Fees
    • Token: The ERC20 token being bridged.
    • Amount: _amount + internalFeeAmount
    • This is the total amount of tokens that must be sent/approved, including any internal fees charged by the warp route

Exact Amount Out Semantics

Warp routes use “exact amount out” semantics, meaning:
  • The _amount parameter in transferRemote specifies the exact amount the recipient receives
  • Fees are charged on top of this amount from the sender
  • Total tokens required = _amount + internalFeeAmount + externalFeeAmount
Example:
Important: Always query fees immediately before the transfer with the consistent parameters, as fees may change based on destination, recipient, amount, gas prices, exchange rates, or warp route configuration.

Deploy your HWR

Ready to deploy your HWR? It’s easy, follow the step-by-step guide.