AxLabs has released neow3j v3.17, adding new features introduced in the latest Neo update and reworking the behavior of the Java assert statement when compiled for NeoVM.
The new release introduces the Murmur32 hash method and transaction VM state call added in the CryptoLib and LedgerContract native contracts respectively. The team also completed implementation of WitnessRules support, providing further flexibility to Java developers when scoping their signers.
Most significantly in neow3j v3.17 is a breaking change related to the use of assert statements in contract code. Prior to the update, these statements were compiled to use the NeoVM throw opcode, which emits a catchable exception.
In a previous NeoVM update, a new assert opcode was introduced. Unlike throw, a transaction that executes assert will immediately fail and cease further execution. Not only cheaper to execute, this opcode ensures no unexpected behavior is caused by the original assertion being caught and handled, for example when a function is called by a different contract.
AxLabs notes that this change will need to be considered for all smart contracts written using v3.17. Developers can decide whether they want to throw a catchable exception or use a direct assert statement as is appropriate in their own code. Examples have been provided, and the relevant documentation has been updated.
Other notable changes include support for the Neo Express fast-forward feature, allowing developers to easily test time-based contract executions. Two bug fixes for the compiler were completed, one related to events without parameters, and the other a fault when handling more than 6 branches in a switch statement.
The full release notes can be found at the following link:
https://github.com/neow3j/neow3j/releases/tag/3.17.0
About The Author: Brett Rhodes
Brett is a blockchain enthusiast and freelance writer who originally began producing content for the gaming & eSports industries. Now he spends most of his time contributing in the Neo ecosystem.
More posts by Brett Rhodes