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
| Field | Description |
|---|---|
chain | The blockchain network identifier |
pub_key | Harbor's public key for this chain |
address | The vault address for deposits |
router | The Router Contract address to use |
gas_rate | Current gas rate in wei |
outbound_tx_size | Estimated outbound transaction size |
outbound_fee | Current outbound fee |
dust_threshold | Minimum 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.
Related
- Deposit Transactions - Full deposit formatting requirements
- Refunds - What happens when deposits fail