Skip to content

Releases: onflow/cadence

v0.23.1

07 Mar 23:05
Compare
Choose a tag to compare

πŸ›  Improvements

Full Changelog: v0.23.0...v0.23.1

v0.23.0

03 Mar 04:37
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

  • Remove PublicKey.isValid by @robert-e-davidson3 in #1273, #1454

    The PublicKey constructor now validates the public key data and aborts the program if it is invalid.
    The isValid field was removed.

⭐ Features

  • Add converter functions to produce path values from strings by @dsainati1 in #1437, #1211

    Paths can now be constructed at run-time. The following path constructors were added:

    fun PublicPath(identifier: string): PublicPath?
    fun PrivatePath(identifier: string): PrivatePath?
    fun StoragePath(identifier: string): StoragePath?

    Each of these functions take an identifier and produce a path of the appropriate domain.
    For example, to construct a public path from a string:

    let pathID = "foo"
    let path = PublicPath(identifier: pathID) // is /public/foo

    For more information, see https://docs.onflow.org/cadence/language/accounts/#path-functions

  • Add RLP decoding utility methods by @ramtinms in #1397, #1456

    Cadence now provides RLP decoding functions through the built-in contract RLP.
    It provides the following functions for decoding strings and lists:

    fun decodeString(_ input: [UInt8]): [UInt8]
    fun decodeList(_ input: [UInt8]): [[UInt8]]

    For more information, see https://docs.onflow.org/cadence/language/built-in-functions/#rlp

  • Add index to for loop by @dsainati1 in #1216, #1452

    For-loops may now declare an indexing variable:

    for index, element in array {
        // ...
    }
  • Add BLS-specific crypto functions by @dsainati1 in #1236, #1250, #1430

    PublicKey gained a new function to verify a proof-of-possession:

    fun verifyPoP(_ proof: [UInt8]): Bool

    Cadence now provides BLS-specific functions through the built-in contract BLS.
    It provides the following functions:

    fun aggregateSignatures(_ signatures: [[UInt8]]): [UInt8]?
    fun aggregatePublicKeys(_ publicKeys: [PublicKey]): PublicKey?

    For more information, see https://docs.onflow.org/cadence/language/crypto/#bls

  • Adding tracing by @ramtinms in #1179, #1448

πŸ›  Improvements

🐞 Bug Fixes

πŸ™Œ New Contributors

Thank you to our new contributor, @robert-e-davidson3!

Full Changelog: v0.21.3...v0.23.0

v0.21.3

01 Mar 20:31
Compare
Choose a tag to compare

🐞 Bug Fixes

Full Changelog: v0.21.2...v0.21.3

v0.21.2

16 Feb 19:23
Compare
Choose a tag to compare

🐞 Bug Fixes

Full Changelog: v0.21.1...v0.21.2

v0.21.1

03 Feb 00:00
Compare
Choose a tag to compare

πŸ›  Improvements

  • Allow adding new interface conformances during a contract update (#1396) @SupunS

v0.21.0

26 Jan 00:18
Compare
Choose a tag to compare

⭐ Features

🐞 Bug Fixes

v0.20.0

17 Nov 23:31
Compare
Choose a tag to compare

This release culminates a half-year effort to improve the Cadence storage layer, i.e. how Cadence values are stored in accounts, in particular arrays, dictionaries, and composite values. @fxamacker and @ramtinms designed and implemented completely new array and ordered map data structures, resulting in atree. These data structures are fast and scalable: they allow efficient access and allow efficient modifications to arrays and dictionaries with very large number of elements. @turbolent and @SupunS integrated this new library into Cadence. This new storage layer also fixed a bug in the resource owner field. Please see the breaking changes section for more details.

In addition, this release saw several feature and documentation contributions by new community members. Thank you!

πŸ’₯ Breaking Changes

  • With the storage layer update, the owner field of resources is now implemented correctly, as originally designed:
    The field is only non-nil if the resource is currently in storage, and is always nil if the resource is on the stack.
    This breaking change is actually a bug fix, as the owner field was previously implemented incorrectly: After a resource was moved out of storage onto the stack, the owner field was still referring to the account the resource was stored in.

    Please ensure your Cadence programs do not rely on the broken behaviour and update them if needed.

    For example, in a function that is passed a resource as an argument, the resource's owner field will always be nil:

    pub fun deposit(token: @NonFungibleToken.NFT) {
        // token.owner is always nil!
        // ...
    }
  • Add limit on call stack depth (#1138) @SupunS

⭐ Features

πŸ›  Improvements

🐞 Bug Fixes

πŸ“– Documentation

πŸ™Œ New Contributors

Thank you to all new contributors:

Changelog

v0.19.1...v0.20.0

v0.19.1

13 Sep 20:32
Compare
Choose a tag to compare

πŸ›  Improvements

  • Remove obsolete script/transaction parameter check (#1114) @SupunS

🐞 Bug Fixes

  • Fix export errors by properly wrapping in runtime errors (#1139) @SupunS

v0.19.0

13 Sep 20:24
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

⭐ Features

πŸ›  Improvements

🐞 Bug Fixes

πŸ“– Documentation

v0.18.0

15 Jun 22:45
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

⭐ Features

πŸ›  Improvements

🐞 Bug Fixes

πŸ“– Documentation

  • Add documentation for the Cadence documentation generator (#1003) @SupunS