Add Multicall Support
DoubleOTheven opened this issue · 0 comments
Feature Request
Allow bundled calls to one or more contracts. A user can package an array of message reads and they will all resolve at the same time. EVM has a dedicated contract for handling Multicall (with a frontend lib), but we may be able to do it via PolkadotJS, Capi, or via Light Clients. We may also want to do this via an ink! contract similar to the EVM approach. Let's discuss the Pros and Cons of each in this chat...
Suggestion
Provide a hooks useCalls
and useCallSubscriptions
that allow a user to call multiple functions on one or more contract in a single request. We want the results to resolve at the same time
Motivation
Prevent flicker in UI, reduce API rate limits, make better DevEx
Use Cases
calling every read message you want on one or more contract in a single line of code and have this results update the view one time vs every time a single request resolves.