logoAcademy

Interact with the ICM Registry

Retrieve latest Interchain Messaging version using the Registry.

Let's start by interacting the registry. Registry is deployed on specific addresses depending the chain you're operating and the status of the network at the deployment time. For your local network you can find it out with the following command:

Get C-Chain Registry Address

avalanche primary describe

Save C-Chain Registry Address

Let's put the address of the registry in an environment variable:

export C_CHAIN_REGISTRY_ADDRESS=0x1234...

Get L1 Registry Address

avalanche subnet describe myblockchain

Save L1 Registry Address

export MYBLOCKCHAIN_REGISTRY_ADDRESS=0x5678...

Retrieve Latest ICM Messenger Version:

Let's interact with the Registry by getting the latest version of the Interchain Messaging Messenger deployed on C-Chain:

cast call --rpc-url local-c --private-key $PK $C_CHAIN_REGISTRY_ADDRESS "latestVersion()(uint256)" 
Updated:

On this page

Edit on Github