Skip to main content

Building an event-driven multi-blockchain dapp

In this course, we will write a dapp that consists of several blockchains and communicates with eachother using the Inter-chain Messaging Facility (ICMF).

The dapp we will build is an ordering system consisting of three blockchains:

  1. Ordering chain: Users can order products using this chain
  2. Factory chain: Produces products and keeps statistics of how many products have been created
  3. Delivery chain: Handles delivery of orders to customers

The main idea for this system is to separate concerns for different actors. Products are made available on the order chain and can be ordered (bought) by a user. Factory workers only need to interract with the factory chain. Delivery companies need only interract with the delivery chain. There are other ways to slice a dapp into several blockchains, for example in terms of sharding (having several factories for different product types) to either parallelize the workload or to achieve different time scales (a factory may produce big batches but the order and deliver chain need to handle separate orders), but this serves as a nice example on how to use the ICMF.

The system we will build can be modeled like this:

What we will learn

By the end of this course you will gain understanding in

  • How to model a system consisting of several blockchains
  • How to use ICMF to send messages between blockchains