Allow mapping of Structs to user defined types through the config Registry #250
architect-dev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, thanks for the great package, its made my life so much easier. I'm working on a tool that requires both frontend and contract integration, and I've found that I would love to ability to match AbiParameters to custom types via the struct's
internalType
Take these two structs for example:
They share the same overall structure, but are named differently to improve readability and DX of contract engineers. When they are used as an input param of a function, they look like this in the abi:
I would like to be able to catch these
internalType
s and apply a type to each before they get treated as tuples and merged into a shared{ 0xString }
. I think that a good place to do this would be leveraging theResolvedRegistry
. I've set up a crude (but working) example here:Which gives these results:
I think this is very niche, but allows a lot of expressiveness for library authors. Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions