I have created a solidity contract to store the states and the data of a Dapp but to power the frontend, I need different view of that data! While I can use solidity as my backend but I don't think it makes much sense to have the complex logic of building the views on user's end! Furthermore, it would require querying 100's of variables to build the UI every time the page is loaded!

So, I have decided to create a backend database in sql/mongodb to power the UI and will use solidity events to keep the backend data in sync with the contract's state changes!

I am interested in knowing if this is the right thing to do or are there any other approaches that I can use to tackle the situation. Furthermore, what's the best way to listen for solidity events!

Do I need to run a ethereum node locally and use node.js to listen to events and make the necessary changes in database whenever there is a new event or are there any other easier options? A Rest api or something?


"QuickBlocks is a collection of software libraries, open source command-line tools, and applications intended to improve the ease and speed with which one may access data from the Ethereum blockchain."


Quickblocks.io is the website,and it requires a local Ethereum node to connect to.


I have made Zorba for the same purpose. It is in development but you can use it for syncing erc20 token transactions, ethereum txs and balances. Hope it helps!


I would recommend ETHQL: A GraphQL interface to Ethereum : https://github.com/ConsenSys/ethql

EthQL is a server that exposes a GraphQL endpoint to the public Ethereum ledger. It works against the standard JSON-RPC APIs offered by all Ethereum clients. It is built in TypeScript, and thus leverages the vast ecosystem of GraphQL tooling while preserving compile-time type safety.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.