Hop
Search…
Configuration
Hop Node configuration examples
Note: The configuration requirements are evolving so documentation may not be up-to-date. Please let us know if there are issues setting up the Hop Node.
Please ask the Hop team for an configuration specific to your Hop Node if you are going to be a whitelisted bonder.

Configuration example

1
{
2
"network": "mainnet",
3
"chains": {
4
"ethereum": {
5
"rpcUrl": "https://mainnet.infura.io/v3/84842078b09946638c03157f83405213",
6
"maxGasPrice": 500
7
},
8
"gnosis": {
9
"rpcUrl": "https://rpc.gnosischain.com",
10
"maxGasPrice": 90
11
},
12
"polygon": {
13
"rpcUrl": "https://polygon-rpc.com",
14
"maxGasPrice": 5000
15
},
16
"optimism": {
17
"rpcUrl": "https://mainnet.optimism.io",
18
"maxGasPrice": 500
19
},
20
"arbitrum": {
21
"rpcUrl": "https://arb1.arbitrum.io/rpc",
22
"maxGasPrice": 500
23
}
24
},
25
"tokens": {
26
"USDC": true
27
},
28
"routes": {
29
"ethereum": {
30
"polygon": true,
31
"gnosis": true,
32
"arbitrum": true,
33
"optimism": true
34
},
35
"polygon": {
36
"ethereum": true,
37
"gnosis": true,
38
"arbitrum": true,
39
"optimism": true
40
},
41
"gnosis": {
42
"ethereum": true,
43
"polygon": true,
44
"arbitrum": true,
45
"optimism": true
46
},
47
"arbitrum": {
48
"ethereum": true,
49
"polygon": true,
50
"gnosis": true,
51
"optimism": true
52
},
53
"optimism": {
54
"ethereum": true,
55
"polygon": true,
56
"gnosis": true,
57
"arbitrum": true
58
}
59
},
60
"db": {
61
"location": "/root/db"
62
},
63
"logging": {
64
"level": "debug"
65
},
66
"keystore": {
67
"location": "/root/keystore.json",
68
"parameterStore": "/Hop/Bonder/Keystore/Pass",
69
"awsRegion": "us-east-1"
70
},
71
"watchers": {
72
"bondTransferRoot": true,
73
"bondWithdrawal": true,
74
"commitTransfers": true,
75
"settleBondedWithdrawals": true,
76
"xDomainMessageRelay": true
77
},
78
"commitTransfers": {
79
"minThresholdAmount": {
80
"USDC": {
81
"polygon": {
82
"ethereum": 170000,
83
"gnosis": 50000,
84
"optimism": 130000,
85
"arbitrum": 130000
86
},
87
"gnosis": {
88
"ethereum": 170000,
89
"polygon": 130000,
90
"optimism": 130000,
91
"arbitrum": 130000
92
},
93
"optimism": {
94
"ethereum": 170000,
95
"polygon": 130000,
96
"gnosis": 50000,
97
"arbitrum": 130000
98
},
99
"arbitrum": {
100
"ethereum": 170000,
101
"polygon": 130000,
102
"gnosis": 50000,
103
"optimism": 130000
104
}
105
}
106
}
107
},
108
"fees": {
109
"USDC": {
110
"ethereum": 14,
111
"polygon": 14,
112
"gnosis": 25,
113
"optimism": 14,
114
"arbitrum": 14
115
}
116
}
117
}
Copied!

Properties

Key
Value
network
The Ethereum network to use. (e.g. "mainnet', "kovan", "goerli")
chains
Chain configuration such as RPC URLs and max gas prices to use. See chains section below for details.
tokens
List of tokens and their bridges that bonder will interact with. See tokens section below for details.
routes
Desired routes to bond withdrawals.
db
Cache db options. See db section below for details.
logging
Logging options. See logging section below for details.
keystore
Keystore options. See keystores section below for details.
watchers
List of watchers.
commitTransfers
Configuration for committing transfers.
fees
Set bonder fees for each asset in terms of basis points (BPS).
bonders
List of other bonders, used for calculating total available liquidity. See bonders section below for details.

chains

Specify configuration options for each chain:
1
"chains": {
2
"<chain-slug>": {
3
"rpcUrl": "<chain-rpc-url>",
4
"maxGasPrice": <max-gas-price>
5
},
6
...
7
}
Copied!
Chain slug options:
Chain slug
Description
ethereum
Ethereum
gnosis
Gnosis Chain (formerly xDai)
arbitrum
Arbitrum
optimism
Optimism
polygon
Polygon (formerly Matic)
Note: The RPC URL is optional and a default will be used if not specified.
Note: If the selected network doesn't support a chain, it will be ignored.

tokens

Specify which tokens and their token bridges to interactive with:
1
"tokens": {
2
"USDC": true,
3
...
4
}
Copied!

routes

Specify which routes to bond:
1
"routes": {
2
"ethereum": {
3
"polygon": true,
4
"gnosis": true,
5
"arbitrum": true,
6
"optimism": true
7
},
8
"polygon": {
9
"ethereum": true,
10
"gnosis": true,
11
"arbitrum": true,
12
"optimism": true
13
},
14
...
15
}
Copied!

db

Configure options for leveldb database used for caching:
Key
Default value
Description
location
~/.hop-node/db
Location for cache db.

logging

Configure logging levels:
Key
Default value
Description
level
debug
Logging level. Options are "debug", "info", "warn", "error"

keystore

Configure options for keystore:
Key
Default value
Example
Description
location
~/.hop-node/keystore.json
~/.hop-node/keystore.json
Location of keystore to use.
pass
mysecret
Passphrase for encrypted keystore.
parameterStore
/Hop/Bonder/Keystore/Pass
Use AWS SSM Parameter Store for keystore password.
awsRegion
us-east-1
us-east-1
AWS region to use when using SSM Parameter Store.

watchers

Run Hop Node as different watchers:
Watcher
Description
bondTransferRoot
Bond transfer roots leaving ORUs
bondWithdrawal
Bond withdrawals sent across chains
commitTransfers
Commit transfers to create a transfer root
settleBondedWithdrawals
Settle individual transfers
xDomainMessageRelay
Exit transfer roots form their source chain

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.
1
"commitTransfers": {
2
"minThresholdAmount": {
3
"USDC": {
4
"gnosis": {
5
"ethereum": 20000,
6
"polygon": 10000
7
},
8
"polygon": {
9
"ethereum": 20000,
10
"gnosis": 10000
11
}
12
}
13
}
14
}
Copied!

fees

Configure fee options. The fees are in basis points:
1
"fees": {
2
"USDC": {
3
"ethereum": 14,
4
"polygon": 14,
5
"gnosis": 25,
6
"optimism": 14,
7
"arbitrum": 14
8
},
9
...
10
}
Copied!

bonders

List of bonders, used for calculating total available liquidity.
The format is
1
"[TOKEN]": {
2
"[SOURCE_CHAIN]": {
3
"[DESTINATION_CHAIN]": "[BONDER_ADDRESS]"
4
}
5
}
Copied!
Full example:
1
"bonders": {
2
"ETH": {
3
"ethereum": {
4
"optimism": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
5
"arbitrum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
6
"gnosis": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
7
"polygon": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564"
8
},
9
"optimism": {
10
"ethereum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
11
"arbitrum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
12
"gnosis": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
13
"polygon": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564"
14
},
15
"arbitrum": {
16
"ethereum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
17
"optimism": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
18
"gnosis": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
19
"polygon": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564"
20
},
21
"gnosis": {
22
"ethereum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
23
"arbitrum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
24
"optimism": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
25
"polygon": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564"
26
},
27
"polygon": {
28
"ethereum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
29
"arbitrum": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
30
"gnosis": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564",
31
"optimism": "0x710bDa329b2a6224E4B44833DE30F38E7f81d564"
32
}
33
},
34
...
35
}
36
Copied!

Environment variables

Key
Value
BONDER_PRIVATE_KEY
Private key to use for signing transactions if not using an encrypted keystore.
KEYSTORE_PASS
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
SLACK_AUTH_TOKEN
xoxb-123...890
Slack Bot Auth Token
SLACK_CHANNEL
mychannel
Channel ID or name to post to
SLACK_USERNAME
"Hop Node"
Username to give to bot
More granular options for Slack channels:
Key
Example Value
Description
SLACK_WARN_CHANNEL
warning-logs
(optional) Channel for posting warning logs
SLACK_ERROR_CHANNEL
error-logs
(optional) Channel for posting error logs
SLACK_INFO_CHANNEL
info-logs
(optional) Channel for posting info logs
SLACK_LOG_CHANNEL
debug-logs
(optional) Channel for posting debug logs
SLACK_SUCCESS_CHANNEL
success-logs
(optional) Channel for posting success logs
GAS_BOOST_WARN_SLACK_CHANNEL
gasboost-warning-logs
(optional) Channel for wallet signer warning logs
GAS_BOOST_ERROR_SLACK_CHANNEL
gasboost-error-logs
(optional) Channel for wallet signer error logs