This guide explains how to change the owner of your Hyperlane Mailbox using the Hyperlane CLI. Transferring ownership is necessary when you want to give control to a different address, such as for security reasons or when making changes to who manages the Mailbox. As the new owner, you will have full control over the Mailbox settings, including managing hooks, ISM configurations, and permissions for message handling. We’ll guide you through updating the owner address, applying the change, and confirming everything is set correctly.Documentation Index
Fetch the complete documentation index at: https://docs.hyperlane.xyz/llms.txt
Use this file to discover all available pages before exploring further.
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: