dethcrypto / dethcrypto/TypeChain
ethers-v6: AddressLike in encodeFunctionData is incorrect
Open
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
`encodeFunctionData` is a synchronous function, so it cannot resolve `AddressLike`.
Interfaces functions (`encodeFunctionData` and others) should accept `string` instead of `AddressLike`
This code will throw an error:
```ts
declare const alice: Wallet
iface.encodeFunctionData('balanceOf', [alice]);
```
But this will NOT:
```ts
iface.encodeFunctionData('balanceOf', [await alice.getAddress()]);
```
Contributor guide
Assessment
This issue has not been assessed yet.