Using the Hyperlane CLI
One of the quickest way to transfer a mailbox ownership is by using the Hyperlane CLI.Prerequisites
- The core config generated by
hyperlane core init
.- This config is used to deploy core contracts, including the mailbox. By default, it takes the filepath of
CURRENT_DIR/configs/core-config.yaml
.
- This config is used to deploy core contracts, including the mailbox. By default, it takes the filepath of
- The chain that the mailbox was deployed to.
- Access to the private key that currently owns the mailbox.
If you followed the How to Connect Your Chain with
Hyperlane guide, you may have deployed
a mailbox with the owner set to the single private key. In production, it is
advisable to use a multisig.
--chain
set to the name of your chain that the mailbox is deployed on:
core read
, you should see a similar config with owner
set to private key’s address:
CURRENT_DIR/configs/core-config.yaml
.
Follow these steps using the CLI to transfer the existing ownership to another address.
Step 1: Update Config
Updateowner
address in the core-config.yaml
core-config.yaml
Step 2: Apply
Using the CLI, execute:Step 3: Confirm
To confirm using the Hyperlane CLI, execute the following:core read
, you should see a similar config with the now updated owner
: