Skip to content

How to add getAmountsOut? #47

@ubuntutest

Description

@ubuntutest

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions