-
Notifications
You must be signed in to change notification settings - Fork 94
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
Multicall doesn't return result with same type like BigNumber from "ether" when using singlecall !!! #33
Comments
You can use BigNumber.From to parse it on the response in your code. right now in the lib it just returns the nine class version.. would be nicer if it parsed for you for sure on cases where _isBigNumber = true Will look at doing that but for now parse it yourself once result comes back |
Hi! As we have introduced an options parameter into the call method, we could add a new parameter to return bignumbers instead of strings? |
For sure great idea!! be my guest to do a PR @jsertx |
I have seen that the issue is on the Utils.deepClone when building returnObjectResult pushing to callsReturnContext array in the following lines: ethereum-multicall/src/multicall.ts Line 165 in 80ae156
ethereum-multicall/src/multicall.ts Line 209 in 80ae156
ethereum-multicall/src/multicall.ts Line 237 in 80ae156
We could release a new minor version: adding the extra options parameter |
Nice find yeah that will nuke the big number class! And now it’s in the wild we can’t really break it! I would say yes do the returnBigNumber option and make it parse stuff back and then as you say we can bring in a breaking change on the major! We can guide the docs to this as well! PR welcome! |
Mulltilcall returns CallValueResult with type:
{
type: "BigNumber",
hex: "0x0176b344f2a78c0000"
},
It doesn't the same type as I call single. This case type is likely { BigNumber } from "ether." It's
{
_isBigNumber: true,
_hex: "0x0176b344f2a78c0000"
},
Could anyone tell me if I missed anything?
The text was updated successfully, but these errors were encountered: