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

Abigen fail with ABI containing components with same name. #2628

Open
NanezX opened this issue Oct 7, 2023 · 0 comments
Open

Abigen fail with ABI containing components with same name. #2628

NanezX opened this issue Oct 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@NanezX
Copy link

NanezX commented Oct 7, 2023

Version
ethers v2.0.10

Platform
Linux USER-HP-EliteBook 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Description
In Solidity we can declare events, errors or functions with same name, but they are different based on their selector. When you provide an ABI to abigen that contain two components with same name (but different selector), abigen fail with:

the name "ComponentName" is defined multiple times
"ComponentName" must be defined only once in the type namespace of this module

image

Of course, the expected behavior is support ABI generated from contract with components that have same name but different selector.

I hope this is enough information, thanks

@NanezX NanezX added the bug Something isn't working label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant