-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
signer/fourbyte: add support for nested types in selectors #24407
Conversation
I feel like there might be some overlap with package accounts/abi here. I think we should try to keep ABI-related parsing in that package, and then use it in signer/fourbyte. |
Please check if accounts/abi has suitable functionality, and if not, move the new parsing functions there. |
0fab6cd
to
f92ae69
Compare
Hi @fjl, thanks for the feedback! |
Hi @fjl , please let me know if there's any other change you'd like me to make on this. |
Thanks for putting in the work to make this change in a clean way! |
…24407) This replaces the simple selector parser in signer/fourbyte with one that can actually handle most types. The new parser is added in accounts/abi to also make it useable elsewhere.
…24407) This replaces the simple selector parser in signer/fourbyte with one that can actually handle most types. The new parser is added in accounts/abi to also make it useable elsewhere.
…24407) This replaces the simple selector parser in signer/fourbyte with one that can actually handle most types. The new parser is added in accounts/abi to also make it useable elsewhere.
The selector parsing logic in fourbytes has been improved to work with tuples.
This requires changing the current regexp-based approach to a small hand-written parser.
Among potentially other things, this allows to call functions that have tuples in their signatures from
clef
, which would previously fail with the following error:ValueError: validation failed: Transaction contains data, but the ABI signature could not be found: signature 40b1eb10 not found