Skip to content

v0.3.0

Choose a tag to compare

@rkalis rkalis released this 11 Dec 14:11
· 690 commits to master since this release

cashc compiler

  • ✨ Covenants abstraction! All individual preimage fields can be accessed without manual decoding, passing, and verification.
    • Available fields: tx.version, tx.hashPrevouts, tx.hashSequence, tx.outpoint, tx.bytecode, tx.value, tx.sequence, tx.hashOutputs, tx.locktime, tx.hashtype.
    • When any of these fields is used inside a function, this function is marked covenant: true, and requires a preimage as parameter (automatically passed by CashScript SDK).
    • The correct fields are efficiently cut out of the preimage and made available.
    • The first occurrance of require(checkSig(sig, pubkey)); is identified, and preimage verification is inserted using the same sig/pubkey. Important: if you have multiple checkSig statements, keep in mind that the first will be used for verification.
    • Automatically cuts off VarInt from scriptCode, so tx.bytecode contains the actual contract bytecode.
  • ✨ Output instantiation! Automatically construct output formats for covenant transactions.
    • new OutputP2PKH(bytes8 amount, bytes20 pkh)
    • new OutputP2SH(bytes8 amount, bytes20 scriptHash)
  • 🐛 Fix bug with invalid output when the final statement in a contract is an if-statement.

CashScript SDK

  • ✨ Add fee option to TransactionOptions. This allows you to specify a hardcoded fee for your transaction.
  • ✨ Automatically pass in sighash preimage into covenant functions. Important: uses the hashtype of the first signature in the parameters for generation of this preimage.
  • 💫 Better fee estimation for transactions with many inputs.

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