Skip to content

4.0.0

Compare
Choose a tag to compare
@austinabell austinabell released this 25 May 13:41
· 222 commits to master since this release

4.0.0 Stable Release

This release was delayed to be able to incorporate a better cross-contract API, in the future these stable releases will come more frequently.

There has been a lot changed since the last stable version (3.1.0) so to track changes, the releases or changelog should be used.

A high-level explanation of the changes can be found in this discussion and a link to a migration document will be added here once completed.

Changes since 4.0.0-pre.9

Added

  • Added Eq, PartialOrd, Ord to json_types integer types. PR 823

Changed

  • Updated cross-contract, ext API for new NEP264 functionality. PR 742
    • More details on the API change can be found here
    • This API uses a default weight of 1 with no static gas, but this weight, the static gas, and the attached deposit can all be modified on any external call
    • ext methods are added to each #[near_bindgen] contract struct by default and for each method for convenience
  • Updated nearcore crates used for unit testing to version 0.13.0. PR 820
    • Removed outcome function from MockedBlockchain (incomplete and misleading data)
    • Changed created_receipts to return owned Vec instead of reference to one
    • receipt_indices field was removed from Receipt type in testing utils
  • Deprecate and remove near-sdk-sim. Removes sim proxy struct from #[near_bindgen]. PR 817
    • If near-sdk-sim tests can't be migrated to workspaces-rs, 4.0.0-pre.9 version of near-sdk-rs and near-sdk-sim should be used
  • Optimized read_register to read to non-zeroed buffer. PR 804
  • Switched Rust edition for libraries to 2021. PR 669

Fixes

  • Avoid loading result bytes with near_sdk::is_promise_success(). PR 816