Landslide
  • 👋Landslide
  • Github
  • Product Guides
    • 🏄Slide SDK
      • Run Landslide Locally
        • How to setup Slide SDK locally
        • Conect your wallet to a local network
        • How to deploy a CosmWasm contract
      • Run Landslide on Testnet
        • How to connect Cosmostation
      • License
      • Security Audit
    • 🦄Landslide EVM
    • ⚙️IBC Light Client
      • Relayer Operator Guide
      • Chain integrators guide
        • Lower than v0.50
        • Higher than v0.50
      • IBC Connection
      • IBC Go
      • IBC Relayer AVAX L1 Proof
    • 🔌RPC
    • 🔄API endpoints
    • ⏭️Avalanche Warp Messaging
  • Integrations
    • 🚀Building with Andromeda
    • ⚛️Connecting Existing Cosmos dApps to Avalanche
      • Case Study: Osmosis
      • ABCI Calls
  • FAQ
    • 🤓FAQ
    • 🛣️Roadmap
  • Overview
    • 💡What is CometBFT?
    • 💡What is Avalanche Consensus?
    • ✨Features
  • Fundamentals
    • 🛠️Getting set up
  • Roadmap
    • 🤝Interchain Staking
Powered by GitBook
LogoLogo

Links

  • Home
  • Twitter

©2024 Gaia Labs LTD

On this page
  • Integrating the Avalanche Light-Client Module in Your Cosmos SDK Application
  • 1. Import the Avalanche Light-Client Module
  • 2. Register the Avalanche Module in the Module Manager
  • 3. Add module to the RegisterIBC function

Was this helpful?

Export as PDF
  1. Product Guides
  2. IBC Light Client
  3. Chain integrators guide

Higher than v0.50

Integrating the Avalanche Light-Client Module in Your Cosmos SDK Application

Enhance your Cosmos SDK application by integrating the light-clients/14-avalanche module. Follow this step-by-step guide to easily import and register the Avalanche light-client in your project.

1. Import the Avalanche Light-Client Module

First, ensure you import the Avalanche (ava) module into your Cosmos SDK application. Typically, this is done in the ibc.go file, where your application's modules are defined.

import (
  // other imports...
  ava "github.com/cosmos/ibc-go/v8/modules/light-clients/14-avalanche"
)

2. Register the Avalanche Module in the Module Manager

Next, add the ava module to your application’s ModuleManager. Locate the section where you initialize the ModuleManager and include the Avalanche light-client:

app.ModuleManager = module.NewManager(
  // other modules...
  ava.AppModuleBasic{},
)

3. Add module to the RegisterIBC function

Finally, register the Avalanche module in the RegisterIBC function of your application. This function is typically found in the ibc.go file.

func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule {
	modules := map[string]appmodule.AppModule{
        // other modules... 
        ava.ModuleName: ava.AppModuleBasic{},
    }
...
}

By following these steps, you'll successfully integrate the Avalanche light-client module into your Cosmos SDK application, enabling enhanced interoperability with Avalanche-based chains.

PreviousLower than v0.50NextIBC Connection

Last updated 7 months ago

Was this helpful?

⚙️