4.0.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
,Ord
tojson_types
integer types. PR 823
Changed
- Updated cross-contract,
ext
API for newNEP264
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 version0.13.0
. PR 820- Removed
outcome
function fromMockedBlockchain
(incomplete and misleading data) - Changed
created_receipts
to return ownedVec
instead of reference to one receipt_indices
field was removed fromReceipt
type in testing utils
- Removed
- Deprecate and remove
near-sdk-sim
. Removessim
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 ofnear-sdk-rs
andnear-sdk-sim
should 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