Teleporter Avalanche L1s on Devnet
This how-to guide focuses on deploying Teleporter-enabled Avalanche L1s to a Devnet.
After this tutorial, you would have created a Devnet and deployed two Avalanche L1s in it, and have enabled them to cross-communicate with each other and with the C-Chain through Teleporter and the underlying Warp technology.
For more information on cross chain messaging through Teleporter and Warp, check:
Note that currently only Subnet-EVM and Subnet-EVM-Based virtual machines support Teleporter.
Prerequisites
Before we begin, you will need to have:
- Created an AWS account and have an updated AWS
credentials
file in home directory with [default] profile
Note: the tutorial uses AWS hosts, but Devnets can also be created and operated in other supported cloud providers, such as GCP.
Create Avalanche L1s Configurations
For this section we will follow this steps, to create two Teleporter-enabled Avalanche L1s, <chain1>
and <chain2>
.
Create a Devnet and Deploy an Avalanche L1 in It
Let's use the devnet wiz
command to create a devnet <devnetName>
and deploy <chain1>
in it.
The devnet will be created in the us-east-1
region of AWS, and will consist of 5 validators only.
Notice some details here:
- Two smart contracts are deployed to the Avalanche L1: Teleporter Messenger and Teleporter Registry
- Both Teleporter smart contracts are also deployed to
C-Chain
- AWM Teleporter Relayer is installed and configured as a service into one of the nodes (A Relayer listens for new messages being generated on a source Avalanche L1 and sends them to the destination Avalanche L1.)
CLI configures the Relayer to enable every Avalanche L1 to send messages to all other Avalanche L1s. If you add more Avalanche L1s to the Devnet, the Relayer will be automatically reconfigured.
Checking Devnet Configuration and Relayer Logs
Execute node list
command to get a list of the devnet nodes:
Notice that, in this case, i-0f1815c016b555fcc
was set as Relayer. This host contains a systemd
service called awm-relayer
that can be used to check the Relayer logs, and set the execution status.
To view the Relayer logs, the following command can be used:
Deploying the Second Avalanche L1
Let's use the devnet wiz
command again to deploy <chain2>
.
When deploying Avalanche L1 <chain2>
, the two Teleporter contracts will not be deployed to C-Chain in Local Network as they have already been deployed when we deployed the first Avalanche L1.
Verify Teleporter Is Successfully Set Up
To verify that Teleporter is successfully, let's send a couple of cross messages:
You have Teleport-ed your first message in the Devnet!
Obtaining Information on Teleporter Deploys
Obtaining Avalanche L1 Information
By executing blockchain describe
on a Teleporter enabled Avalanche L1, the following relevant information can be found:
- Blockchain RPC URL
- Blockchain ID in cb58 format
- Blockchain ID in plain hex format
- Teleporter Messenger address
- Teleporter Registry address
Let's get the information for <chain1>
:
Obtaining C-Chain Information
Similar information can be found for C-Chain by using primary describe
:
Controlling Relayer Execution
CLI provides two commands to remotely control Relayer execution:
Last updated on