xclud / web3dart

Ethereum library, written in Dart.
https://pub.dev/packages/web3dart
MIT License
170 stars 94 forks source link

Allow making multiple queries in a single rpc call [enhancement] #83

Open juampiq6 opened 1 year ago

juampiq6 commented 1 year ago

A simple change can be done to allow for multiple queries to be done in a single rpc call to the client. In this way we can fetch more information in a faster way. I have done some short research and found out that some clients dont accept much queries (lets say maximum of N) in a single rpc request. In javascript clients, a multicall contract is used but i could find a lot of advantages to using it besides using multiples queries through rpc (in fact, i found it to be more complicated and hacky, though it can be more performant in the server side). I will make the PR with the neccessary changes.