Retrieving Interchain Messenger from the Registry
Use Registry in a Cross-Chain dApp.
Let's now integrate the registry into a smart contract. Let's go back to the very simple string sending contract from the beginning:
Don't forget to replace the destinationBlockchainID with Blockchain ID (HEX) from your Avalanche L1!
The key things to understand:
- We are importing the
ITeleporterRegistry.sol
interface - We have a variable for the registry address instead of the messenger address
- Before sending the message we get the latest version from the registry