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

Support unnamed inputs in get_abi_input_names #297

Open
reedsa opened this issue Dec 13, 2024 · 0 comments · May be fixed by #299
Open

Support unnamed inputs in get_abi_input_names #297

reedsa opened this issue Dec 13, 2024 · 0 comments · May be fixed by #299

Comments

@reedsa
Copy link
Contributor

reedsa commented Dec 13, 2024

What happened?

When I pass an ABI function or event with unnamed inputs, get_abi_input_names throws an error KeyError: 'name'.

According to this article, names are optional.

Code that produced the error

function_abi = {"type": "uint256"}
get_abi_input_names(function_abi)

Full error output

KeyError: 'name'

Fill this section in if you know how this could or should be fixed

return [
arg.get("name", None)
for arg in cast(Sequence[ABIComponent], abi_element.get("inputs", []))
]

eth-utils Version

No response

Python Version

No response

Operating System

No response

Output from pip freeze

No response

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

Successfully merging a pull request may close this issue.

1 participant