Skip to content

Releases: gnidan/abi-to-sol

v0.5.2

11 Dec 01:42
e50571e
Compare
Choose a tag to compare

abi-to-sol v0.5.2

Upgrading some dependencies to resolve some dependabot alerts

Release changes

Dependency updates

v0.5.1

17 Nov 01:03
Compare
Choose a tag to compare

abi-to-sol v0.5.1

Just some internals :)

Release changes

Internal improvements

  • Add script for upgrading dependencies (#37 by @gnidan)
  • Upgrade typescript to ^4.4.4 (#38 by @gnidan)

v0.5.0

01 Aug 01:20
Compare
Choose a tag to compare

abi-to-sol v0.5.0

abi-to-sol now accepts custom errors in input ABIs and outputs corresponding custom Solidity errors in the interfaces it generates.

Solidity added custom errors in v0.8.4 (see their blog post about it!) To use ABIs with custom errors, abi-to-sol now requires the selected output version range to include only versions greater than or equal to this version. Note that abi-to-sol's default version of >=0.7.0 <0.9.0 does not support this new feature; you'll need to pass -V explicitly or select ^0.8.4 in the web UI. (Please open a discussion or an issue if you feel the behavior here should be more permissive and not throw an exception!)

This release also includes a change to the Web UI, to use react-simple-code-editor instead of react-ace, hopefully improving the experience on mobile.

Also of note: this project now keeps a full CHANGELOG.

Thanks for reading!

Release changes

New features

Fixes

  • Properly error when generating structs on unsupported Solidity versions (#32 by @gnidan)
  • Fix version-feature checks to succeed only when entire range has feature (#35 by @gnidan)

Internal improvements

  • Enforce CHANGELOG entries in pull requests (#30 by @gnidan)

Dependency updates

  • Update dependency: @truffle/abi-utils@^0.2.2 (#29 by @gnidan)

web-ui changes

  • Switch to react-simple-code-editor (#31 by @gnidan)

v0.4.0

23 Jul 03:49
Compare
Choose a tag to compare

abi-to-sol v0.4.0

This release updates abi-to-sol to be more robust in light of differences between Solidity versions (and more attentive to what Solidity features are actually needed by a given input ABI)

Note: since you can request a desired Solidity range for output, abi-to-sol will now error if the input ABI uses features that would result in more than one syntax form across versions in the desired range. For instance: if the input ABI defines a fallback function, abi-to-sol won't let you generate >=0.4.0 (since the syntax changed in v0.5.0)

New features

  • Error upon Solidity version syntax ambiguity (#21 by @gnidan)

Enhancements

  • Include package version in autogen notice (#25 by @gnidan)
  • Only emit pragma experimental ABIEncoderV2 when necessary (#22 by @gnidan)

Bug fixes

  • Put structs in the right places (#24 by @gnidan)

Housekeeping

  • Note lack of support for ABI errors (#26 by @gnidan)
  • Change default version to >=0.7.0 <0.9.0 (#20 by @gnidan)

Internal improvements

web-ui changes

  • Show errors from generateSolidity (#19 by @gnidan)

v0.3.0

20 Jul 04:51
Compare
Choose a tag to compare

abi-to-sol v0.3.0

abi-to-sol now has a web UI! 🎉 See it in action here.

In addition, this release begins to add functionality for producing output to match syntax of older Solidity versions. Previously, the -V / solidityVersion option only affected the pragma, but the rest of output might not compile on the version specified. This release starts to change that with support for the following two Solidity changes:

  • Array arguments are now specified as having location memory. Previously, they were specified as calldata or listed without location. This tool now handles this distinction back to ^0.4.24 (or maybe a bit earlier).
  • Solidity now distinguishes between fallback and receive. This tool now handles that syntax change across Solidity's past, and will even generate function () external payable; when given an ABI with a receive.

There are still various other version-specific differences to account for (e.g. structs outside of contracts), but those will have to come later. In the meantime: enjoy! ⚙️

Note: this release marks a git history change to convert to a lerna monorepo. In the process, this removes support for Node v10 (i.e. I've turned off the CI job due. Please open an issue if you need Node v10 support... maybe it's an easy fix). This also pins prettier-plugin solidity to 1.0.0-alpha.59 due to problems with later versions.

New features

  • Export GenerateSolidityOptions interface type (#13 by @gnidan)
  • Allow disabling prettier (#14 by [@gnidan])
  • Add web UI (#16 by [@gnidan])
  • Begin to differ output based on Solidity version / features used by ABI (#17 by [@gnidan])

Bug fixes

  • Replace invalid characters in internalTypes (#15 by [@gnidan])

v0.2.1

01 Mar 23:14
Compare
Choose a tag to compare

abi-to-sol v0.2.1

For some reason @drizzle/store was being listed as a dependency of this package. This package does not use @drizzle/store, so this release removes the dependency.

Dependency updates

  • Remove unused @drizzle/store dependency (#12 by @gnidan)

v0.2.0

27 Oct 16:16
Compare
Choose a tag to compare

abi-to-sol v0.2.0

This release moves some logic to the new @truffle/abi-utils package and updates internal naming conventions accordingly.

Dependency updates

  • Switch to using @truffle/abi-utils (#11 by @gnidan)

v0.1.6

08 Oct 02:23
Compare
Choose a tag to compare

abi-to-sol v0.1.6

This release upgrades prettier-plugin-solidity to support anonymous events.

Enhancements

Dependency updates

  • Upgrade prettier-plugin-solidity to v1.0.0-alpha.59 (#6 by @gnidan)

Internal improvements

v0.1.5

06 Oct 00:19
Compare
Choose a tag to compare

abi-to-sol v0.1.5

This release changes the default Solidity pragma from ^0.7.0 to the more general >=0.5.0 <0.8.0. It also adds runtime support for source maps (e.g. for exception stack traces)

Enhancements

  • Broaden default Solidity version to >=0.5.0 <0.8.0 (and centralize defaulting logic) (#1 by @gnidan)
  • Add runtime source map support (#4 by @gnidan)

Internal improvements