What's Changed
⭐ Features
Capability Controllers
FLIP 798: Capability controllers got implemented.
You can start migrating existing uses of the linking-based capability API to the new Capability Controller API. The linking-based capability API is now deprecated and will be removed in a future release.
- Capability controllers by @turbolent in #2501
Compact Cadence Format
A codec for the new Cadence Compact Format (CCF) got implemented,
a more efficient format for encoding Cadence values. It is an alternative to the current JSON-Cadence format, and will eventually replace it.
- Add CCF codec implementing CCF Specification (RC1) by @fxamacker in #2364
- Support 2 new attachment types in CCF codec by @fxamacker in #2516
Standard Library
Thanks to a Developer Grant, new contributor @darkdrag00nv2 improved the standard library with many new features: 👏
- Add
Address.fromBytes
to createAddress
from[UInt8]
by @darkdrag00nv2 in #2452 - Extend ordering comparisons (<, <=, >, >=) to
Bool
andCharacter
by @darkdrag00nv2 in #2430 - Extend ordering comparison (<, <=, >, >=) to
String
by @darkdrag00nv2 in #2470 - Allow equality comparisons for dictionaries by @darkdrag00nv2 in #2414
- Implement
Address.fromString
by @darkdrag00nv2 in #2491 - Add
fromBigEndianBytes
conversion function toNumber
types by @darkdrag00nv2 in #2496 - Introduce
Word128
integer type by @darkdrag00nv2 in #2497 - Introduce
Word256
integer type by @darkdrag00nv2 in #2510 - Implement
check
functionality in AuthAccount by @darkdrag00nv2 in #2492
Tooling
- Introduce the
Test.expectFailure
function by @m-Peter in #2468 - Enrich test framework interface by @m-Peter in #2505
- Introduce a
LocationFilter
field onCoverageReport
type by @m-Peter in #2474 - Add basic support for multiline input to REPL by @turbolent in #2434
- Add history support to REPL by @turbolent in #2442
🛠 Improvements
- Improve external types and JSON codec by @turbolent in #2401
- Add support for generating code of nested types by @turbolent in #2417
- Refactor
AuthAccount
andPublicAccount
types to Cadence by @turbolent in #2418 - Refactor and optimize types by @turbolent in #2419
- Update handling of user errors returned by atree by @fxamacker in #2426
- Add more built-in matchers to the Cadence Testing Framework by @m-Peter in #2420
- Add reference tracking for the
result
variable by @SupunS in #2447 - Various improvements by @turbolent in #2451
- Refactor console REPL into type, add type command and command completion by @turbolent in #2450
- Initialize
stdlib
values ofTest
contract lazily by @m-Peter in #2403 - Handle wrapped errors during storage iteration by @SupunS in #2488
- Improve code generation for members by @turbolent in #2489
- Improve errors by @turbolent in #2502
- Add tests for test framework blockchain by @SupunS in #2514
- Improve export and encoding by @turbolent in #2517
- Add support for restricted types to Go code generator by @turbolent in #2475
🐞 Bug Fixes
- Check for potential resource loss in reference expression by @turbolent in #2437
- Fix built-in
result
variable for optional resource typed returns by @SupunS in #2444 - Add validation for exporting references to destroyed resources by @SupunS in #2453
- Fix and test sema to static type conversion by @turbolent in #2465
- Fix race conditions in CCF tests caused by shared usage of types by @turbolent in #2467
- Properly wrap nil in optionals depending on the nested optional type by @turbolent in #2469
- Don't truncate error message stack early in case of multiline errors by @dsainati1 in #2486
- Fix userPanicToError to handle wrapped user error. by @pattyshack in #2498
📖 Documentation
- Remove parameter name from API documentation when argument label is given by @MaxStalker in #2406
- Update crypto doc by @tarakby in #2439
- Improve documentation sidebar by @turbolent in #2456
- Add an
Examples
section on the Cadence Testing Framework doc by @m-Peter in #2493 - replace docs with links by @nialexsan in #2487
💥 Go API Breaking Chance
- Improve
cadence.Path
by @turbolent in #2427 - Introduce a
CoverageReport
field onruntime.Config
type by @m-Peter in #2416
Other Changes
- Update dependencies by @turbolent in #2407
- Fix release notes configuration by @turbolent in #2435
- Add integration tests (in Cadence) for
Crypto
contract and generate code coverage by @m-Peter in #2485 - Improve linting by @turbolent in #2512
New Contributors
- @darkdrag00nv2 made their first contribution in #2414
- @nialexsan made their first contribution in #2487
Full Changelog: v0.38.0...v0.39.0