Deploy an EVM <-> SVM HWR
Prerequisites
Ensure you have the following installed and configured:
- Hyperlane CLI
- Rust (latest stable version)
- Yarn and Node.js (latest stable version)
- Solana CLI tools
Walkthrough
Step 1: Create the HWR Directory
-
In
./rust/sealevel/environments/${environment}
, create a directory calledwarp-routes
-
Inside
warp-routes
, create a new directory for your HWR deployment, e.g., e.g.environments/mainnet3/warp-routes/pzeth
-
Optional: If you want to, open a PR to the
hyperlane-registry
with metadata to associate with the synthetic token in the HWR. Example here.- Tip: Although not critical, for the
image
field try to pick a source that is unlikely to break the URL
- Tip: Although not critical, for the
Step 2: Deploy on the SVM Side
-
From here on, to deploy on the SVM side you can also follow our official guide for tips: Deploy SVM HWR
-
Create
token-config.json
for the SVM configuration, e.g.- Often EVM tokens have 18 decimals, which are too large for the SVM. The pattern is to bridge them into SOL as 9 decimals. This can be done using
remoteDecimals: 18
.
- Often EVM tokens have 18 decimals, which are too large for the SVM. The pattern is to bridge them into SOL as 9 decimals. This can be done using
-
Run the deployment command:
Step 3: Deploy on the Ethereum Side
-
Deploy the Ethereum HWR contract, which will also enroll the SVM router based on the yaml token config.
-
Ensure you have latest version of the Hyperlane CLI.
-
Create a HWR deployment config file with the CLI’s config command:
hyperlane warp init
The command provides a walkthrough, prompting you for configuration choices directly in the terminal. Use the following steps for your HWR configuration. You can input during the walkthrough or directly in the generated YAML config file.
- Manually set
foreignDeployment: <SVM address>
for the SVM chain, as shown in the config example below. - Set
interchainSecurityModule: "0x0000000000000000000000000000000000000000"
to use the default ISM set in the destination chain Mailbox - Set the
gas
to a ceiling of the compute units you expect the SVM message delivery transaction to take. For instance, HWRs have gas set to300
. It’s important for this to be an upper limit - the relayer will not deliver HWR transfer messages otherwise, because senders would pay an insufficient amount to have them delivered.
- Manually set
-
Deploy using the Hyperlane CLI:
hyperlane warp deploy
-
Confirm the deployment:
-
Step 4: Update the SVM token-config.json
-
Back to Solana tooling now, update the
token-config.json
with the foreign deployment:- The fields for
ethereum
should be set to values from the HWR contract artifact. token
should be set tocollateralAddressOrDenom
(the address of the token being bridge)foreignDeployment
should be set toaddressOrDenom
(the address of the HWR contract, likeHypERC20Collateral
).
- The fields for
Step 5: Deployment
- Run the final deployment command: