![]() On reception of the post message, create a new post with the title and the The data tables are modified accordingly. You must modify the source code to add the logic inside those functions so that Method defines the logic when the packet is not received on the target chain OnTimeoutIbcPostPacket hook is called when a sent packet times out.OnAcknowledgementIbcPostPacket hook is called when a sent packet isĪcknowledged on the source chain.This method defines the packet reception logic. OnRecvIbcPostPacket hook is automatically called when a packet is received.Method also defines the logic before the packet is sent over IBC to another TransmitIbcPostPacket is called manually to send the packet over IBC.The methods for primary transaction logic are in the x/blog/keeper/ibc_post.goįile. To scaffold a sendable and interpretable IBC packet: The postID is acknowledged on the sending chain. The title and content are stored on the target chain. The ignite packet command creates the logic for an IBC packet that can be sent You must generate code for a packet that contains the title and the content of Scaffold a sendable and interpretable IBC packet Disable the messages option for the app since you want the posts to beĬreated upon reception of IBC packets and not directly created from a user's The -no-message flag disables thisįeature. When a new type is scaffolded, the default behavior is to scaffold messages thatĬan be sent by users for CRUD operations. When the flag is not present, the type is scaffolded in the module that matches This optional flag lets you manage multiple modules within your Ignite CLI app. The -module flag defines which module the new transaction type is added to. For theīlog app, you created title, content, postID, and chain fields. The next arguments define the fields that are associated with the type. The first argument of the ignite scaffold list command specifies To scaffold a new blockchain named planet: Use Ignite CLI to scaffold the blockchain app and the blog module. These identifiersĪre visible on the parameter chain. Sent posts that are acknowledged and timed out contain the title and the The sending chain has the additional data postID. On the sending chain, save the acknowledged and timed out posts.Īfter the transaction is acknowledged by the receiving chain, you know that the The chains can send posts between each other using IBC. The Cosmos SDK universe that contain Hello Mars, Hello Cosmos, and Hello Earthįor this simple example, create an app that contains a blog module that has aĪfter you define the logic, run two blockchains that have this module installed. ![]() For this tutorial, you can write posts for Create a blockchain Ĭreate a blockchain app with a blog module to write posts on other blockchains This tutorial covers essentials like modules, IBC packets, relayer, and the ![]() Relayer with Ignite CLI to connect two blockchains. Tutorial teaches you how to create two blockchains and then start and use the The IBC relayer lets you connect between sets of IBC-enabled chains. The IBCmodule interface defines how packetsĪnd messages are constructed to be interpreted by the sending and the receiving ThisĮnd-to-end, connection-oriented, stateful protocol provides reliable, ordered,Īnd authenticated communication between heterogeneous blockchains. IBC handles transport across different sovereign blockchains. The Inter-Blockchain Communication protocol (IBC) allows blockchains to talk toĮach other. Create a basic blog post and save the post on another blockchain.Navigate between blockchains using the Cosmos SDK and the Ignite CLI Relayer.Use IBC to create and send packets between blockchains.This foundational knowledge helps you navigate This tutorial builds an understanding of how to create and The Hello World tutorial is a time-honored tradition inĬomputer programming. The Inter-Blockchain Communication protocol (IBC) is an important part of theĬosmos SDK ecosystem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |