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

How to add getAmountsOut? #47

Open
ubuntutest opened this issue Nov 11, 2022 · 0 comments
Open

How to add getAmountsOut? #47

ubuntutest opened this issue Nov 11, 2022 · 0 comments

Comments

@ubuntutest
Copy link

I am using a custom ABI,
I can use without problems balanceOf and symbol.

but if I try to use the getAmountOut function
"function getAmountsOut (uint amountIn, address [] memory path) public view returns (uint [] memory amounts)"

I get the following error:

const error: any = new Error(message);
                           ^
Error: types/values length mismatch (count={"types":2,"values":0}, value={"types":[{"name":"amountIn","type":"uint256","indexed":null,"components":null,"arrayLength":null,"arrayChildren":null,"baseType":"uint256","_isParamType":true},{"name":"path","type":"address[]","indexed":null,"components":null,"arrayLength":-1,"arrayChildren":{"name":null,"type":"address","indexed":null,"components":null,"arrayLength":null,"arrayChildren":null,"baseType":"address","_isParamType":true},"baseType":"array","_isParamType":true}],"values":[]}, code=INVALID_ARGUMENT, version=abi/5.7.0)

which is the correct way?

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

No branches or pull requests

1 participant