How-To Build a DApp Using The APIS

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.

👋 About THE APIS:

The APIS is an indexing protocol for reading and writing to open networks. Making APIs open and accessible to power a decentralized world.

Website | Twitter |GitHub |Discord |Roadmap

--

--

--

The APIS is an indexing and querying protocol for reading and writing to open networks. Hook by The APIS

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

[BLOG] Leading Blockchain Commercialization

Cosmos Ecosystem: 2022 Hidden Gems

Special Q. Tell us more about the whole Hunny ecosystem setup.

Proof of Work vs Proof Of Stake

AMA Recap: The Dude x Rangers Protocol

KuChain Weekly Report #1

Multiple Strategy Cake Vaults: Gain Stable and High APY on Pinecone

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
The APIS

The APIS

The APIS is an indexing and querying protocol for reading and writing to open networks. Hook by The APIS

More from Medium

The Importance of Continuous Smart Contract Security Audits

Gods Unchained’s increasing momentum! Check the data why it is just starting!

Detailed explanation of Ethereum smart contract vulnerabilities: Reentrancy vulnerability

CyberTime integrates RedStone data and pseudo-random number generator