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

Accept Addressable objects as address arguments in function calls #4087

Closed
fvictorio opened this issue May 26, 2023 · 4 comments
Closed

Accept Addressable objects as address arguments in function calls #4087

fvictorio opened this issue May 26, 2023 · 4 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@fvictorio
Copy link

fvictorio commented May 26, 2023

Describe the Feature

Given this contract:

contract Foo {
  function f(address a) public {}
}

I would like to be able to do:

await foo.f(foo)

But that throws a TypeError: no matching function (argument="key", value="_typedSymbol", code=INVALID_ARGUMENT, version=6.4.0)

I have to do this instead:

await foo.f(await foo.getAddress())
@fvictorio fvictorio added the enhancement New feature or improvement. label May 26, 2023
@lazyfuhrer
Copy link

Can you assign me ? @fvictorio

@fvictorio
Copy link
Author

Not really, I'm not a member of this repository.

@ricmoo ricmoo added on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 labels Jun 2, 2023
@ricmoo ricmoo added bug Verified to be an issue. and removed enhancement New feature or improvement. labels Jun 7, 2023
@ricmoo
Copy link
Member

ricmoo commented Jun 7, 2023

This was a bug specifically in how the Contract interacted with the type guard for Typed objects. It’s in CI now. :)

@ricmoo
Copy link
Member

ricmoo commented Jun 8, 2023

The bug ihas been fixed in v6.5.0.

Thanks! :)

@ricmoo ricmoo closed this as completed Jun 8, 2023
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jun 8, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

3 participants