How to Initialize a Router on the Connext Network
Designed to be used in conjunction with our Connext Router Setup Guide.
Getting Started
Before you can operate a Router (Node) on the Connext network, you will need to call the initializeRouter
function on-chain so that it can be added to the Connext Core Contract for each chain that you plan to provide liquidity — see reference. This guide will teach you how to use louper.dev to call this function and complete router initialization.
Before initializing your router on mainnet, make sure that you are properly whitelisted. As of recently, routers do not need to be whitelisted for operation on the testnet, only mainnet.
It is important to be aware that you will need to initialize your router on each chain that you plan to provide liquidity. If you fail to initialize your router on a chain, and supply liquidity, the funds will not be utilized.
Initialize on a Single Chain
⚠️ Repeat the following steps for each chain that you plan to provide liquidity.
As stated before, we are interacting with the Connext Core smart contract when we are initializing the router. Although one is currently under-development, Connext does not offer a user interface (UI) for initializing your router. We’ve found that the easiest way to do so is by using louper.dev.
To initialize your router, you should first click on one of the following contract links for louper.dev corresponding to the network that you would like to initialize on
Testnet — Connext Core Contracts Louper.dev:
- Ethereum Goerli: https://louper.dev/diamond/0xFCa08024A6D4bCc87275b1E4A1E22B71fAD7f649?network=goerli
- Optimism-Goerli: https://louper.dev/diamond/0x5Ea1bb242326044699C3d81341c5f535d5Af1504?network=optimism_goerli
- Polygon Mumbai: https://louper.dev/diamond/0x2334937846Ab2A3FCE747b32587e1A1A2f6EEC5a?network=mumbai
- Arbitrum-Goerli: https://louper.dev/diamond/0x2075c9E31f973bb53CAE5BAC36a8eeB4B082ADC2?network=arbitrum_goerli
Mainnet — Connext Core Contracts Louper.dev:
- Ethereum: https://louper.dev/diamond/0x8898B472C54c31894e3B9bb83cEA802a5d0e63C6?network=mainnet
- Optimism: https://louper.dev/diamond/0x8f7492DE823025b4CfaAB1D34c58963F2af5DEDA?network=optimism
- Polygon: https://louper.dev/diamond/0x11984dc4465481512eb5b777E44061C158CF2259?network=polygon
- Arbitrum-One: https://louper.dev/diamond/0xEE9deC2712cCE65174B561151701Bf54b99C24C8?network=arbitrum
- Binance Smart Chain: https://louper.dev/diamond/0xCd401c10afa37d641d2F594852DA94C700e4F2CE?network=binance
- Gnosis: https://louper.dev/diamond/0x5bB83e95f63217CDa6aE3D181BA580Ef377D2109?network=xdai
Now that you’ve selected the chain to initialize on, scroll down and locate the RoutersFacet contract. Click WRITE at the bottom of the contract card.
⚠️WARNING⚠️ The connected wallet needs to be the router’s wallet, as the msg.sender in the smart contract is initialized as the router on the Connext network.
On the next page, connect using your router’s wallet, and select the initializeRouter method. The required parameters are described as follows:
- _owner: The address that is able to set and change the _recipient address, or set a new _owner address.
- _recipient: The address that will receive funds when liquidity is removed.
Before executing this method, it’s important to understand the permissions for the different roles governing Connext routers. See the table below for reference.
If you would like to use your router’s wallet to fully manage the router and funds, you should set both of these parameters to the router wallet. Click EXECUTE when you are satisfied with the passed parameters.
You can read more about the router recipient and the router owner on Managing your Router. If you’d like to change the recipient or owner address for your router, see Initialize a Router.
Note: If you’d like to change the
_owner
or_recipient
address in the future, you can call the function again — but only the currently set_owner
has the ability to set a new owner or recipient.
Conclusion
After verifying that you’ve initialized the router on all of the networks that you plan to provide liquidity on, you can head back to the main guide:
📱 Questions & Contact
Congratulations on completing this guide! If you need to get in touch with the author of this guide, please contact me on Telegram: