Skip to content

v0.8.0

Latest
Compare
Choose a tag to compare
@gnidan gnidan released this 08 Jun 01:50
· 5 commits to develop since this release
9a4e0b4

abi-to-sol v0.8.0

This release adds support for user-defined value types, introduced in Solidity v0.8.8. If you supply an ABI JSON that uses UDVTs in its external interface, abi-to-sol will now output a type MyUdvt is uint256 (e.g.) statement and use that name in the ABI functions/events that use it (provided that your desired solc range is at least ^0.8.8).

Cautionary notes / please give me a heads up if there are problems!

This release is quite large in terms of internal changes. Originally, I built abi-to-sol to keep track only of the struct types that a given ABI uses, so the internals were pretty naive. Since UDVTs can now possibly appear as part of a contract's ABI, it's become worthwhile to redo how abi-to-sol keeps track of everything that needs a declaration. (Notice how the "BunchaStructs" example in the abi-to-sol web UI shows how diffrent type declarations get grouped into their pre-defined namespaces.)

Looking ahead towards addressing #41, I really want abi-to-sol to be able to accept multiple ABIs for multiple contracts in the same project (e.g., specify the various ABIs you need for Uniswap v3, all at once), since doing those one-at-a-time today means you'll be deleting a lot of duplicative structs.). The work in this release to support UDVTs should hopefully pave the way for this new behavior, which seems like a good v1.0.0 target.

In the meantime, I'd appreciate any testing you all could provide! I tried to be quite thorough in checking for software regressions, but it's possible I missed something with a change this large. Please do open an issue at the first sign of trouble!

Release changes

New features

  • Rearchitect declaration internals to support UDVTs (#114 by @gnidan)

Project updates