4.0.0-pre.5
Pre-release
Pre-release
austinabell
released this
24 Dec 00:28
·
273 commits
to master
since this release
This release comes with changes to clean up the API to get ready for a stable release as well as adding new features such as more near_sdk::store
updated collection types! Notable changes include:
- fix(standards): Fix NFT impl macros to not import
HashMap
andnear_sdk::json_types::U128
. PR 571. - Add drain iterator for
near_sdk::store::UnorderedMap
. PR 613.- Will remove all values and iterate over owned values that were removed
- Fix codegen for methods inside a
#[near_bindgen]
to allow usingmut self
which will generate the same code asself
and will not persist state. PR 616. - Make function call terminology consistent by switching from method name usages. PR 633.
- This is only a breaking change if inspecting the
VmAction
s of receipts in mocked environments. All other changes are positional argument names.
- This is only a breaking change if inspecting the
- Implement new iterator for
collections::Vec
to optimize fornth
andcount
. PR 634- This is useful specifically for things like pagination, where
.skip(x)
will not load the firstx
elements anymore - Does not affect any
store
collections, which are already optimized, this just optimizes the legacycollections
that useVec
- This is useful specifically for things like pagination, where
- Add consts for near, yocto, and tgas. PR 640.
near_sdk::ONE_NEAR
,near_sdk::ONE_YOCTO
,near_sdk::Gas::ONE_TERA
- Update SDK dependencies for
nearcore
crates used for mocking (0.10
) andborsh
(0.9
) - Implemented
Debug
for allcollection
andstore
types. PR 647 - Added new internal mint function to allow specifying or ignoring refund. PR 618
- store: Implement caching
LookupSet
type. This is the new iteration of the previous version ofnear_sdk::collections::LookupSet
that has an updated API, and is located atnear_sdk::store::LookupSet
. PR 654, PR 664. - Deprecate
testing_env_with_promise_results
,setup_with_config
, andsetup
due to these functions being unneeded anymore or have unintended side effects PR 671- Added missing pattern for only including context and vm config to
testing_env!
to remove friction
- Added missing pattern for only including context and vm config to
- Added
_array
suffix versions ofsha256
,keccak256
, andkeccak512
hash functions inenv
PR 646- These return a fixed length array instead of heap allocating with
Vec<u8>
- These return a fixed length array instead of heap allocating with
- Added
ripemd160_array
hash function that returns a fixed length byte array PR 648 - Added
ecrecover
underunstable
feature for recovering signer address by message hash and a corresponding signature. PR 658. - standards: Add require statement to ensure minimum needed gas in FT and NFT transfers at start of method. PR 678