Configuration
Bonder configuration examples
The bonder configuration will prepare the networks and assets supported by your bonder. The config is very custom to your bonder, so please read through each item carefully.
Below is an example of a USDC bonder running on Ethereum, Gnosis, Polygon, Optimism, and Arbitrum.
Configuration example
Properties
Key | Value |
---|---|
| The Ethereum network to use. (e.g. "mainnet', "goerli") |
| Chain configuration such as RPC URLs and max gas prices to use. See chains section below for details. |
| List of tokens and their bridges that bonder will interact with. See tokens section below for details. |
| Desired routes to bond withdrawals. |
| Cache db options. See db section below for details. |
| Logging options. See logging section below for details. |
| Keystore options. See keystores section below for details. |
| List of watchers. |
| Configuration for committing transfers. |
| Set bonder fees for each asset in terms of basis points (BPS). |
| List of other bonders, used for calculating total available liquidity. See bonders section below for details. |
| Signer options. See signer section below for details. |
chains
chains
Specify configuration options for each chain.
The RPC URL is optional and a default will be used if not specified. The redundant RPC URLs are optional. If supplied, these URLs will be utilized to confirm data on the source chain before proceeding with a transaction on the destination chain."
Note: If the selected network doesn't support a chain, it will be ignored.
Chain slug options:
Chain slug | Description |
---|---|
| Ethereum |
| Gnosis Chain (formerly xDai) |
| Arbitrum One |
| Optimism |
| Polygon (formerly Matic) |
| Arbitrum Nova |
| Base |
| Linea |
| Polygon zkEVM |
tokens
tokens
Specify which tokens and their token bridges to interactive with:
routes
routes
Specify which routes to bond:
The structure is source
-> destination
, for example:
The above example means that the bonder will bond transfers at the destination sent from polygon
->gnosis
.
db
db
Configure options for leveldb database used for caching:
Key | Default value | Description |
---|---|---|
|
| Location for cache db. |
logging
logging
Configure logging levels:
Key | Default value | Description |
---|---|---|
|
| Logging level. Options are "debug", "info", "warn", "error" |
keystore
keystore
Configure options for keystore:
Key | Default value | Example | Description |
---|---|---|---|
|
|
| Location of keystore to use. |
| mysecret | Passphrase for encrypted keystore. | |
| /Hop/Bonder/Keystore/Pass | Use AWS SSM Parameter Store for keystore password. | |
|
|
| AWS region to use when using SSM Parameter Store. |
watchers
watchers
Watchers are like services in the Hop Node.
Watcher | Description |
---|---|
| Bond transfer roots leaving ORUs |
| Bond withdrawals sent across chains |
| Commit transfers to create a transfer root |
| Settle individual transfers |
| Confirm transfer roots on L1 |
| Relay messages sent from L1 to L2 |
They should all be enabled unless there's a specific reason not to enable certain watchers.
commitTransfers
commitTransfers
The minThresholdAmount
is used to determine when to commit the bundle of transfers.
The format is token: { source: { destination: amount } }
This example will commit transfers when a total of at least 20,000 MATIC are pending commit in the bundle, going either from gnosis->ethereum or polygon->ethereum, and a 10,000 threshold for the direction gnosis->polygon or polygon->gnosis.
fees
fees
Configure fee options. The fees are in basis points:
bonders
bonders
List of bonders, used for calculating total available liquidity.
The format is
Full example:
blocklist
blocklist
Configure a blocklist of addresses for bonder to not bond transfers.
Using local blocklist file of addresses:
Using remote blocklist file of addresses:
Using inline list of blocklisted addresses:
Note: The Hop Node will need to be restarted whenever updating local, remote, or inline blocklist of addresses.
OFAC list: https://www.treasury.gov/ofac/downloads/sdnlist.txt
signer
signer
Configure options for signer:
Key | Default value | Example | Description |
---|---|---|---|
|
| Type of signer to use. Either | |
| 11223344 | AWS KMS keyId. | |
|
| AWS region to use when using KMS or Lambda. | |
|
| Name fo the Lambda function to call. |
Environment variables
Key | Value |
---|---|
| Private key to use for signing transactions if not using an encrypted keystore. |
| Keystore passphrase if using encrypted keystore and not using password file or AWS Parameter Store option. |
Notifications
Slack
The Hop Node can post to Slack when an error occurs or when it sends transactions.
To set it up, configure the following environment variables:
Key | Example Value | Description |
---|---|---|
| xoxb-123...890 | Slack Bot Auth Token |
| mychannel | Channel ID or name to post to |
| "Hop Node" | Username to give to bot |
More granular options for Slack channels:
Key | Example Value | Description |
---|---|---|
| warning-logs | (optional) Channel for posting warning logs |
| error-logs | (optional) Channel for posting error logs |
| info-logs | (optional) Channel for posting info logs |
| debug-logs | (optional) Channel for posting debug logs |
| success-logs | (optional) Channel for posting success logs |
| gasboost-warning-logs | (optional) Channel for wallet signer warning logs |
| gasboost-error-logs | (optional) Channel for wallet signer error logs |
Last updated