Configuration
The router is accepts configuration using the config file config.json
in the root directory of the docker-compose repo.
See the testnet or mainnet (coming soon) guides for addresses and URLs.
The JSON schema accepts the following keys:
sequencerUrl
: The URL of the sequencer.redis
: Requires. Object containing the following keys to configure an external redis instance:host
: The hostname of the redis instance.port
: The port of the redis instance.
server
: Required. Object containing the following keys to configure the HTTP server:adminToken
: Required. Secret token used to authenticate admin requests.port
: Optional. The port the router will listen on. Defaults to8080
.host
: Optional. The host the router will listen on. Defaults to0.0.0.0
.requestLimit
: Optional. Unused.
web3SignerUrl
: Recommended. The URL for a running Web3Signer instance. This is the recommended approach to private key storage.mnemonic
: Optional, Discouraged. The mnemonic used to generate the private key. Using the mnemonic directly in the config file is unsafe and not recommended.chains
: Required. The chain configuration. A JSON object with the following keyed bydomain id
with the following object schema as value:providers
: Required. An array of providers URLs for a chain. Use a minimum of 1 URL, but additional URLs provide more fallback protection against provider issues.assets
: Required. An array of assets. Each asset is a JSON object with the following keys:assetId
: Required. The asset ID (ERC20 token address). For native assets, use0x0000000000000000000000000000000000000000
.name
: Required. The Asset Name.mainnetEquivalent
: Optional. The equivalent asset on ETH mainnet for price determinations. Defaults to Connext's configuration.
subgraph
: Optional. An object containing the following keys to configure subgraphs.runtime
: Optional. An array of subgraph URLs for a chain. Additional URLs provide more fallback protection against subgraph issues. If not provided, will default to Connext's hosted subgraphs.analytics
: Optional. An array of subgraph URLs for a chain. Additional URLs provide more fallback protection against subgraph issues. If not provided, will default to Connext's hosted subgraphs.maxLag
: Optional. The number of blocks to allow the subgraph's latest block number to be behind the provider's latest block number. Defaults to the recommended value per chain.
deployments
: Optional. An object containing the following keys to configure deployments.connext
: Optional. The address of the Connext.sol contract. If not provided, will default to the latest deployed contracts.
confirmations
: Optional. The number of confirmations required for a transaction to be considered valid on a chain. Defaults to defined values here.minGas
: Optional. The minimum gas amount required to be held by the router's signer address in order to participate in auctions, specified in Wei. Defaults to100000000000000000
(0.1 Ether).gasStations
: Optional. Array of gas station URLs, defaults to using the RPC's gas estimation.
subgraphPollInterval
: Optional. Control the subgraph poll interval in milliseconds. Defaults to 15_000 (15 seconds).maxSlippage
: Optional. The maximum amount of slippage to allow in transfers.
#
Example Configuration FileThese are example RPC URLs. Please get your own RPC URLs!
{ "chains": { "1111": { "assets": [ { "address": "0x3FFc03F05D1869f493c7dbf913E636C6280e0ff9", "name": "TEST" } ], "providers": ["https://rinkeby.infura.io/v3/...", "https://rpc.ankr.com/eth_rinkeby"] }, "3331": { "providers": [ "https://goerli.infura.io/v3/..." ], "assets": [ { "address": "0x3FFc03F05D1869f493c7dbf913E636C6280e0ff9", "name": "TEST" } ] } }, "logLevel": "debug", "web3signer": "http://signer:9000", "sequencerUrl": "https://sequencer.testnet.connext.ninja", "server": { "adminToken": "blahblahblah" }, "redis": { "host": "redis", "port": 6379 }}