Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Add Multicall Support #42

Open
DoubleOTheven opened this issue Apr 6, 2023 · 0 comments
Open

Add Multicall Support #42

DoubleOTheven opened this issue Apr 6, 2023 · 0 comments

Comments

@DoubleOTheven
Copy link
Contributor

DoubleOTheven commented Apr 6, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant