Before you begin
Complete Deploy IBC and send a token. Keep the tutorial’s relayer running. Both connection ends must use the tutorial’srelayer key alias to sign transactions.
Run commands from cli, using the tutorial’s home and configuration.
Install Foundry for the cast commands.
The tutorial deploys one access manager on 41001 and another on 41002.
The deployer key administers both.
This guide uses RELAYER_ROLE and ADMIN_ROLE; see Permissions and upgrades for the other available roles.
Restrict relaying
1. Grant the relayer role
Read the values again if you opened a fresh terminal:1 is RELAYER_ROLE.
Use zero execution delay because the relayer cannot schedule delayed calls.
The relayer calls IBCMulticall, which calls the router.
The access manager checks the relayer’s signing address for multicall calls.
It checks the multicall contract’s address for the resulting router calls.
Grant the role to the current key and multicall contract on each chain:
true, then 0.
Continue only after all checks pass, so relaying stays authorized.
2. Require the role for relaying
Compute the selectors that identify the four router functions andmulticall:
PUBLIC_ROLE to 1:
1 values.
Check both multicall assignments:
1.
Stop if any assignment returns another role.
For permissioning only, run unset DEPLOYER_KEY and stop here.
Continue below to replace the relayer key.
Rotate relayer keys
1. Authorize the replacement key
Create the replacement signer and read its address:1 with zero execution delay:
true, then 0.
2. Switch to the replacement key
Update both connection ends in~/.ibc/ibc.yml.
If you customized the attestors, edit only the connection’s two signer fields to relayer-next and skip the command below. Otherwise, run:
--yes flag skips confirmation.
The command preserves the database settings.
It renders attestors from deployment records.
Validate before stopping the running relayer:
Ctrl-C and wait for exit.
Restart with the same home, configuration, and database:
Readiness log.
Verify a transfer
Back in your working terminal, read the token address:PACKET_STATE_SUCCEEDED:
3. Revoke the old key’s role
Revoke role1 from the old key on both chains.
false, then 0.
Check the replacement’s permission:
true, then 0.
Repeat the transfer checks after revocation.
Then clear the admin key:
Transfer admin authority
Role0 is ADMIN_ROLE. Multiple addresses can hold it.
Grant it to the replacement before revoking the deployer’s admin role, so an admin remains available.
Create a replacement admin key for this local example:
false, then 0.