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

ethers-v6: AddressLike in encodeFunctionData is incorrect #890

Open
olehmisar opened this issue Jan 17, 2024 · 0 comments
Open

ethers-v6: AddressLike in encodeFunctionData is incorrect #890

olehmisar opened this issue Jan 17, 2024 · 0 comments

Comments

@olehmisar
Copy link

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:

declare const alice: Wallet
iface.encodeFunctionData('balanceOf', [alice]);

But this will NOT:

iface.encodeFunctionData('balanceOf', [await alice.getAddress()]);
@olehmisar olehmisar changed the title AddressLike in encodeFunctionData is incorrect ethers-v6: AddressLike in encodeFunctionData is incorrect Jan 17, 2024
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