Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returnValues is an array of values instead of an array of objects #56

Open
alexshmyrkov opened this issue Apr 26, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@alexshmyrkov
Copy link

Hey everyone.
I've encountered an issue where after the multicall, the returnValues prop in the callsReturnContext item is an array (of bignums in my case), instead of an array of objects with key/value pairs.
It's the first time I've encountered such an issue because I've always used this lib for multicalls but it turned out that all of those always had a singular return, meaning that they returned one value and not a collection.
The ABI is correct, I triple checked. Everything works as expected if I call the contract directly.
I'm providing screenshots for context, however, if those are not enough - please let me know, I'll create a codepen demo.

Screenshot 2023-04-25 at 23 16 26

Screenshot 2023-04-25 at 23 17 17

Screenshot 2023-04-25 at 23 17 57

Screenshot 2023-04-25 at 23 18 43

@joshstevens19
Copy link
Owner

joshstevens19 commented Sep 30, 2023

it's a good feature to add right now it doesn't try to map back to objects it just puts them in tuple order, so [0] = [0] of output but your way does make it nicer to read but would be a breaking change so would have to be in a 3.0.0 version - thanks for suggesting this

@joshstevens19 joshstevens19 added the enhancement New feature or request label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants