Skip to content

v0.4.0

Choose a tag to compare

@rkalis rkalis released this 25 May 14:21
· 634 commits to master since this release

cashc compiler

  • ✨ - Add .reverse() member function to bytes and string types.
  • ✨ - Add bitwise operators &, ^, |.
  • ✨ - Allow casting int to variable size bytes based on size parameter.
  • 💥 BREAKING: Casting from int to unbounded bytes type now does not perform OP_NUM2BIN. Instead it is a purely semantic cast to signal that an integer value should be treated as a bytes value.
  • 🏇 Compiler optimisations.
    • Use NUMEQUALVERIFY for the final function in a contract.
    • Only drop the final VERIFY if the remaining stack size is less than 5.
    • Precalculate OutputNullData argument size.
  • 🐛 Fix a bug where return type of sha1 was incorrectly marked as bytes32.
  • 🐛 Data.decodeBool only treated numerical zero as false, now any zero-representation is considered false (e.g. 0x0000, -0, ...).

CashScript SDK

  • ✨ Add ability to provide hardcoded inputs to the transaction rather than use CashScript's coin selection (authored by @maikelmclauflin through #61).
  • 💥 BREAKING: Refactor the transaction flow to a fluent API
    • Remove the TxOptions argument and other arguments to the Transaction send() function.
    • Instead these parameters are passed in through fluent functions from(), to(), withOpReturn(), withAge(), withTime(), withHardcodedFee(), withFeePerByte() and withMinChange().
    • After specifying at least one output with either to() or withOpReturn()the transaction is ready. From here the transaction can be sent to the network with the send() function, the transaction hex can be returned with the build() function, or the meep debugging command can be returned with the meep() function.
  • 💥 Remove Contract.fromCashFile() and Contract.fromArtifact() which were deprecated in favour or Contract.compile() and Contract.import() in v0.2.2.

Migration

This update contains several breaking changes. See the migration notes for a full migration guide.


https://twitter.com/RoscoKalis/status/1264921879346917376