near-sdk (Rust) 4.0.0
This release was delayed to be able to incorporate a better cross-contract API, in the future these stable releases will come more frequently.
- The latest release in the 4.0 line.
- Newest near-sdk (Rust): near-sdk (Rust) 5.30.0
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,Ordtojson_typesinteger types. PR 823
Changed
- Updated cross-contract,
extAPI for newNEP264functionality. PR 742- More details on the API change can be found here
- This API uses a default weight of
1with no static gas, but this weight, the static gas, and the attached deposit can all be modified on any external call extmethods are added to each#[near_bindgen]contract struct by default and for each method for convenience
- Updated
nearcorecrates used for unit testing to version0.13.0. PR 820- Removed
outcomefunction fromMockedBlockchain(incomplete and misleading data) - Changed
created_receiptsto return ownedVecinstead of reference to one receipt_indicesfield was removed fromReceipttype in testing utils
- Removed
- Deprecate and remove
near-sdk-sim. Removessimproxy struct from#[near_bindgen]. PR 817- If
near-sdk-simtests can't be migrated to workspaces-rs,4.0.0-pre.9version ofnear-sdk-rsandnear-sdk-simshould be used
- If
- 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