ABCI Calls
ABCI Calls
The ABCI (Application Blockchain Interface) calls in the Landslide Core repository provide the interface for Cosmos-based dApps to interact with the Avalanche network. Developers can plug their existing Cosmos dApps into the Landslide Core by implementing the necessary ABCI calls. The repository includes example ABCI applications such as the KVStoreApplication and the PersistentKVStoreApplication, which can be used as placeholders for Cosmos SDK-based applications.
How to Connect Existing Cosmos dApps to Avalanche
To connect existing Cosmos dApps to Avalanche using the Landslide Core repository, developers need to implement the necessary ABCI calls in their application. This includes implementing the InitChain
, BeginBlock
, DeliverTx
, CheckTx
, and EndBlock
ABCI calls, which enable the dApp to interact with the Avalanche network. Once the ABCI calls are implemented, the dApp can be compiled using the Landslide SDK and deployed to the Avalanche network.
The ABCI calls in the Landslide Core repository provide the interface for Cosmos-based dApps to interact with the Avalanche network.
InitChain
: This ABCI call is used to initialize the application state. It is called once when the application is first started or when a new chain is created. This is where the initial genesis state of the application is set.BeginBlock
: This ABCI call is called at the beginning of each block. It provides information about the current block and allows the application to update its state based on the contents of the block.DeliverTx
: This ABCI call is called when a new transaction is delivered to the application. It is used to validate the transaction and update the application state if the transaction is valid.CheckTx
: This ABCI call is called when a new transaction is received by the node. It is used to validate the transaction before it is included in a block.EndBlock
: This ABCI call is called at the end of each block. It provides information about the current block and allows the application to update its state based on the contents of the block.
To connect an existing Cosmos dApp to Avalanche using Landslide Core, developers need to implement these ABCI calls in their application. This is done by creating a new ABCI application that implements the necessary functions for each of the ABCI calls. These functions will define how the application interacts with the Avalanche network.
Once the ABCI application is implemented, it can be compiled using the Landslide SDK and deployed to the Avalanche network. The Landslide SDK is a fork of the Cosmos SDK that is 99% compatible with the existing Cosmos SDK, with the exception of the consensus algorithm. The Landslide SDK includes all the necessary libraries and modules needed to build and deploy the ABCI application to the Avalanche network.
In summary, by implementing the necessary ABCI calls, developers can connect their existing Cosmos dApps to the Avalanche network using Landslide Core. This allows them to take advantage of the benefits of the Avalanche network, including faster finality times and IBC compatibility.
Last updated