Skip to main content

How to Transfer Ownership of Your Hyperlane Warp Route

Using the Hyperlane CLI

One of the quickest way to transfer a warp route ownership is by using the Hyperlane CLI.

Prerequisites

  • The warp route config generated by hyperlane warp init.
    • This config is used to deploy a warp route. By default, it takes the filepath of CURRENT_DIR/configs/warp-route-deployment.yaml.
  • The warp route token symbol used in hyperlane warp deploy.
    • The token symbol can be found onchain, or in your local Hyperlane Registry. By default, it is written to $HOME/.hyperlane/deployments/warp_routes/<tokenSymbol>.
  • Access to the private key that currently owns the warp route.
info

If you followed the Deploy a Warp Route guide, you may have deployed a warp route with the owner set to the single private key. In production, it is advisable to use a multisig.

To confirm using the Hyperlane CLI, locate your token symbol and the chain it is deployed on:

hyperlane warp read --symbol <tokenSymbol> --chain <yourChain>

You should be able to select the warp route that you wish to update the ownership for.

After running warp read, you should see a similar config with owner set to private key's address:

yourchain:
mailbox: "0x979Ca5202784112f4738403dBec5D0F3B9daabB9"
owner: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
...

By default, warp read will save the output to CURRENT_DIR/configs/warp-route-deployment.yaml. Follow these steps using the CLI to transfer the existing ownership to another address.

Step 1: Configuration

Update owner address in the warp-route-deployment.yaml

warp-route-deployment.yaml
yourchain:
mailbox: '0x979Ca5202784112f4738403dBec5D0F3B9daabB9'
- owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ owner: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
interchainSecurityModule:
address: '0xd54d32cD6a62482497252D59E6cCC1445fF0b92d'
type: staticAggregationIsm
modules:
- owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
address: '0xcE512189fF1BD41186E9eDda02BF321Fb1FC6eAc'
type: defaultFallbackRoutingIsm
domains: {}
threshold: 1
name: Ether
symbol: ETH
decimals: 18
totalSupply: 0
type: native

Step 2: Apply

Using the CLI, execute by providing the token symbol and warp route config:

hyperlane warp apply --symbol <tokenSymbol> --config $(pwd)/configs/warp-route-deployment.yaml

You should see a batch of transactions executed on chain, and a final message indicating that the warp config has been updated.

Step 3: Confirm

To confirm that the owner was successfully updated using the Hyperlane CLI, run the folllowing command with your token symbol and the chain it is deployed on:

hyperlane warp read --symbol <tokenSymbol> --chain <yourChain>

After running warp read, you should see a similar config with the now updated owner:

yourchain:
mailbox: "0x979Ca5202784112f4738403dBec5D0F3B9daabB9"
owner: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
interchainSecurityModule:
address: "0x8af9445d8A3FbFBd1D5dF185B8a4533Ab060Cf36"
type: staticAggregationIsm
modules:
- owner: "0xe738d6e51aad88F6F4ce6aB8827279cffFb94876"
address: "0xBe0232d5d45f9aD8322C2C4F84c39e64302Cd996"
type: defaultFallbackRoutingIsm
domains: {}
threshold: 1
name: Ether
symbol: ETH
decimals: 18
totalSupply: 0
type: native

By completing these steps, you have successfully transferred and verified ownership of your Warp Route to a new address.