near-sdk (Rust) 4.0.0-pre.8
Added Debug and PartialEq implementations for PromiseError. PR 728.; Added convenience function env::block_timestamp_ms to return ms since 1970. PR 736
- A pre-release, not marked stable on GitHub.
- The newest stable release in the 4.0 line: near-sdk (Rust) 4.0.0
- Newest near-sdk (Rust): near-sdk (Rust) 5.30.0
Added
- Added
DebugandPartialEqimplementations forPromiseError. PR 728. - Added convenience function
env::block_timestamp_msto return ms since 1970. PR 736 - Added an optional way to handle contract errors with
Result. PR 745, PR 754 and PR 757. - Added support for using
#[callback_result]with a function that doesn't have a return. PR 738 - Support for multi-architecture docker builds and updated Rust version to 1.56 with latest contract builder. PR 751
Fixes
- Disallow invalid
Promise::thenchains. Will now panic withpromise_1.then(promise_2.then(promise_3))syntax. PR 410- Current implementation will schedule these promises in the incorrect order. With this format, it's unclear where the result from
promise_1will be used, so it will panic at runtime.
- Current implementation will schedule these promises in the incorrect order. With this format, it's unclear where the result from
- Fixed
signer_account_pkfrom mocked implementation. PR 785
Changed
- Deprecate
callback,callback_vec,result_serializer,initproc macro attributes and remove exports fromnear-sdk. PR 770- They are not needed to be imported and are handled specifically within
#[near_bindgen]
- They are not needed to be imported and are handled specifically within
- Fixed gas assertion in
*_transfer_callimplementations of FT and NFT standards to only require what's needed. PR 760 - Fixed events being emitted in FT standard to include refund transfers and burn events. PR 752
- Moved
VMContextto a local type defined in SDK to avoid duplicate types. PR 785 - Moved
MetadataandMethodMetadatato a pseudo-private module as these are just types used within macros and not stable. PR 771
Removed
- Remove
Cloneimplementation forPromise(error prone) https://github.com/near/near-sdk-rs/pull/783