This repository contains scripts and documentation on deploying Hyperlane core contracts to the Khalani chain, and MultisigIsm
to remote chains that need to be connected.
Originally, this is a fork of hyperlane-xyz/hyperlane-deploy.
- Khalani chain is called
khalanitestnet
and has chainId = 10012 - we deploy to Ethereum Goerli testnet (chainId = 5) and Avalanche Fuji testnet (chainId = 43113)
- 1 relayer from Khalani to Goerli and Fuji
- 1 validator (TODO: will be more) for outgoing messages from Khalani to the end-chains
- the only validator stores checkpoints in S3:
khala-testnet-validator-signatures-1/us-east-1
- deployed
MultisigIsm
on Goerli and Fuji with the only registered validator of the Khalani chain - we do not have any gas policies set up, meanining that our relayers do not charge gas
1. Install foundry
yarn install
git submodule init && git submodule update --remote
- Configure the owner (admin) in networks.json (
<ADDRESS>
) - Deploy the core contracts (
MultisigIsm
,Mailbox
,InterchainGasPaymaster
,ValidatorAnnounce
).
./deploy-khalanitestnet.sh
- Make sure the
khalanitestnet
validators specified in multisig_ism.json are up to date - Configure the owner (admin) in deploy-multisig.sh (
<ADDRESS>
) - Configure RPC URL of the node in deploy-multisig.sh (
<RPC_URL>
)
./deploy-multisig.sh
5. When Hyperlane validators are started and announcement.json
are generated, run ./announce-validator.sh
for all validators
- Each validator saves
announcement.json
file to the checkpoint S3 bucket. This file contains the signed path of the storage checkpoints. - For each validator
ValidatorAnnounce.announce
must be called with the signature, location and address of the validator - Just replace the content of announcement.json with the new one and run
./announce-validator.sh
:- specify private key of the gas payer on Khalani chain — any wallet can be used
deployer
is the wallet that deploys the contracts, calls configuration functions, and pays for the gasowner
is the admin wallet having configuration control on the deployed contracts
- Deploy
ProxyAdmin
- Transfers ownership to the
owner
- Transfers ownership to the
- Deploy
MultisigIsm
- For each remote chain (
originChain
) that wants to pass messages TO Khalani:- call
enrollValidators
for eachoriginChain
->[0xVal1dator, 0xVal2dator, ...]
- call
setThreashold
set threshold required for theoriginChain
- call
- Transfers ownership to the
owner
- For each remote chain (
- Deploy
Mailbox
- deploy
implementation
contructor(originChainID)
- initialize
(owner, _defaultIsm)
- wrap with
TransparentUpgradeableProxy
constructor(ProxyAdmin, Mailbox)
- deploy
- Deploy
ValidatorAnnounce
constructor(Mailbox-address)
- Deploy
MultisigIsm
to the external chain (Goerli, Fuji...) - Enroll Khalani validators to make
MultisigIsm
receive messages FROM Khalani - Transfers ownership to the
owner