4
4 Comments

How-To Build a DApp Using The APIS (Day 259)

Writing to blockchain would require some wait time for the "confirmation". On Ethereum, the typical block time is around 15 seconds, and to make sure the transaction is finalized could take up to 6 to 10 blocks, that means each write transaction would take about 1.5 minutes or more.

While the read operations can be indexed and/or cached to speed up, the only way to speed up a write transaction is by paying higher gas fees, but that's not desirable for most users. So when building dapps it is important to handle this properly, and it takes quite some work to manage the transaction states.

There are many ways we can build the experience. The asynchronous nature and the long wait time would make sense for using an event queue. With the queue we can handle the write transaction state updates asynchronously by having the frontend subscribing to the state updates on queue and refresh the UI accordingly. The APIS can handle the transaction state update callbacks for you, with very minimal code.

We are working on a demo dapp that will show you how to do this step-by-step using the APIS, and we will publish the details in a tutorial, so you can build a dapp literally by forking our code!

To learn more about the APIS project, please feel free to PM me on Twitter

  1. 1

    This is interesting Calvin. Love the architecture diagram. Gives a whole perspective. Is it focused on ETH alone? Any pricing indication for the services provided?

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 18 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments