sbt-ethereum 0.5.1

Update: There’s a potentially dangerous bug in this release, introduced by my reworking of the ABI representation for v0.5.0. The ordering of arguments to multiargument functions may become scrambled, leading usually to execution failures but potentially to costly mistakes. Please do not use sbt-ethereum releases v0.5.0 and v0.5.1. If you have imported ABIs under either of those releases, use ethContractAbiDefaultDrop to delete and reimport them, and ethContractAbiAliasDrop to delete any aliases pointing to them. If you’ve compilations in you shoebox database produced with these version, please get in touch with me and I’ll try to help resolve those. This issue will be fixed in sbt-ethereum v0.5.2.

sbt-ethereum v0.5.1 has been released!

This is a very minor update, with a few tweaks and fixes.

The main reason to jump to a release now is that having to mess around to force an update the ABI alias cache on ethContractAbiImport is very annoying. This was a bug in the implementation of an sbt-ethereum 0.5.0 feature.


  • Fix issue where ethContractAbiImport failed to update the parser’s ABI alias cache, requiring a session restart (or some other cache-updating access) before the alias could be used.
  • Via consuela, generate more informative Exceptions in response to smart contract failures, including decoding and access to any revert message text (both programmatically and in Exception messages)
  • Let unsigned integer values be entered as 0x-prefixed hex more generally, as well as in decimal
  • Let ethUtilHashKeccak256 accept quoted strings, decoded as UTF-8 bytes, to hash, as well as hex-formatted byte strings.
  • Minor message tweaks and typo fixes.


Get the Keccak256 Hash (standard Eth1 hash) of a quoted String

sbt:eth-command-line> ethUtilHashKeccak256 "Error(string)"
[info] 0x08c379a0afcc32b1a39302f7cb8073359698411ab5fd6e3edb2c02c0b5fba8aa
[success] Total time: 0 s, completed Feb 24, 2021, 9:00:40 PM

Note that the first four bytes of this string, a canonicalized function signature, constitute the function identifier.

sbt:eth-command-line> ethUtilFunctionIdentifier Error string
[info] Canonical signature: Error(string)
[info] Identifier: 0x08c379a0
[success] Total time: 0 s, completed Feb 24, 2021, 9:03:10 PM