Hook to read multiple functions at the same time #452
Unanswered
davidlee1435
asked this question in
Ideas
Replies: 3 comments 6 replies
-
Has definitely been on our mind. One day maybe we can support something similar to I guess we would need to support the following cases of contract read batching:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Dope! Something like https://github.com/makerdao/multicall.js might be useful to integrate/derive inspiration from |
Beta Was this translation helpful? Give feedback.
0 replies
-
Update: working on this atm |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Often, I want to query a contract for multiple (5+) functions/state variables.
Having a
useContractRead
hook for each feels really clunky, so I resort touseContract
, which isn't as powerful- I lose a lot of the features that I want such as auto-refreshing andonSuccess/onError/onSettled
callbacks.What I'd like is the ability to pass in multiple functions to call with their respective arguments:
where the call is successful only if every function is successfully fetched. Has this been explored yet?
Beta Was this translation helpful? Give feedback.
All reactions