dethcrypto / dethcrypto/TypeChain
Undefined overrides causes 'too many arguments' error in contract
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
typechain generated this method:
```
getAddLiquidityOut(
tokenAmountsIn: PromiseOrValue[],
overrides?: CallOverrides
): Promise;
```
If you call it like this;
```
contract.getAddLiquidityOut(tokens, undefined);
```
Ether's throws this error:
```
Error: too many arguments: passed to contract (count=2, expectedCount=1, code=UNEXPECTED_ARGUMENT, version=contracts/5.7.0)
```
However, it does work if you pass in overrides:
```
contract.getAddLiquidityOut(tokens, {from: address});
```
This feels like a bug, I would expect the generated code to handle this instead of forcing me to check for overrides before calling the method.
Contributor guide
Assessment
This issue has not been assessed yet.