Skip to main content

Router Contract

The Router Contract serves as the entry point for Harbor across all EVM chains.

Required

All Deposit Transactions must go through the Router Contract to be processed.

Contract Addresses

To locate current Router Contract addresses, use the Inbound Addresses endpoint of the XNode API. The response includes a router property containing the active contract address.

Example API Response

{
"chain": "ETH",
"pub_key": "xyzpub1addwnpepqgcp74e4ehe2qzr7cd3v24u4gd7xu3l802lsexe8a66sqrwlyc0jw5lsxzz",
"address": "0x00de4d8658ab249627286fcf9f920b3078aea4fe",
"router": "0x440a8697af83881878f141e98e84877608266fe8",
"gas_rate": "34000000",
"outbound_tx_size": "80000",
"outbound_fee": "272",
"dust_threshold": "0"
}

Response Fields

FieldDescription
chainThe blockchain network identifier
pub_keyHarbor's public key for this chain
addressThe vault address for deposits
routerThe Router Contract address to use
gas_rateCurrent gas rate in wei
outbound_tx_sizeEstimated outbound transaction size
outbound_feeCurrent outbound fee
dust_thresholdMinimum transaction amount

Using the Router Contract

For EVM chains, all deposits must use the depositWithExpiry function on the Router Contract. See Deposit Transactions for the full function signature and parameters.