Skip to content

Releases: near/near-sdk-rs

near-sdk-macros-v5.0.0-alpha.1

19 Nov 12:22
12a9965
Compare
Choose a tag to compare
chore: release v5.0.0-alpha.1 (#1070)

near-contract-standards-v5.0.0-alpha.1

19 Nov 12:24
12a9965
Compare
Choose a tag to compare

Added

  • adding nep-0330 contract source metadata info (#1106)

Fixed

  • remove receiver approval (#1020)
  • rename param approvals to approved_account_ids (#1019)
  • Properly report an error when Approval Extension is not enabled vs when account is not approved (#1021)

Other

  • [breaking] Use type-safe NearToken instead of u128/U128 (#1104)
  • migrate to a external near-account-id crate for reusable AccountId type (#1108)
  • Update borsh to 1.0.0 (#1075)
  • Move from Gas to NearGas from near-gas crate (#1082)
  • Deprecate Fungible Token declarative macros. (#1054)
  • Add release-plz to automate releases (#1069)
  • (contract-standards) deprecate declarative macros in NFT helpers, promote explicit trait implementations instead (#1042)
  • Added a default method for TokenMetadata (#978)
  • Removed the not ready enum type (#977)
  • Fix empty owner tokens start_index error (#962)

4.1.1

10 Nov 17:14
55020df
Compare
Choose a tag to compare

This release fixes compilation for using the SDK without the "legacy" feature flag

Fixed

  • Fixed invalid import from "legacy" feature flag from stabilized collection. PR 960

4.1.0

09 Nov 18:42
Compare
Choose a tag to compare

The primary changes in this release from 4.0.0 are adding support for near ABI through cargo-near as well as moving near_sdk::store collections from being under the unstable feature flag.

To see all changes since 4.1.0, the releases or changelog should be used.

Changes since 4.1.0-pre.3:

Added

  • Added near_sdk::NearSchema derive macro for convenience in implementing schema types for abi. PR 891.
  • Added support for custom events with #[near_bindgen(event_json(standard = "___"))] syntax. PR 934

Changed

  • Added new legacy feature flag and put near_sdk::collections under it. near_sdk::store will be replacing them. PR 923.
  • Stabilize store::LookupMap and store::UnorderedMap collections. PR 922.
  • Stabilize store::LookupSet and store::UnorderedSet collections. PR 924.
  • abi feature flag is now enabled by default. PR 956.
  • Updated near-abi version to 0.3.0. PR 954.

Removed

Fixes

  • Updated the associated error type for Base58CryptoHash parsing through TryFrom to concrete type. PR 919

4.1.0-pre.3

30 Aug 16:10
Compare
Choose a tag to compare
4.1.0-pre.3 Pre-release
Pre-release

Added

  • Enabled ABI embedding in contract through __abi-embed feature and cargo-near. PR 893
  • Added schemars::JsonSchema implementations for NFT contract standard types to enable ABI generation. PR 904

Changed

  • Stabilized store::Lazy and store::LazyOption types and updated their debug implementations. PR 897 PR 888

4.1.0-pre.2

26 Aug 18:17
Compare
Choose a tag to compare
4.1.0-pre.2 Pre-release
Pre-release

Added

  • Support newly stabilized alt_bn128 host functions that were recently stabilized. PR 885
  • Added Eq implementations for various types. PR 887
  • alt_bn128 host functions supported in testing utils. PR 885

Fixes

  • Standards: NFT storage estimation bug fix and fix retrieval requiring enum and enumeration standard implementation. PR 843

Changed

4.1.0-pre.1

05 Aug 15:11
aa15159
Compare
Choose a tag to compare
4.1.0-pre.1 Pre-release
Pre-release

Added

  • Exposed Rustdocs to exposed ABI type. PR 876

Changed

  • Updated nearcore dependencies used for unit testing to 0.14. PR 875

Fixed

  • Handling of certain types through ABI macros. PR 877

4.1.0-pre.0

02 Aug 00:01
1a0344f
Compare
Choose a tag to compare
4.1.0-pre.0 Pre-release
Pre-release

Added

  • abi feature to expose metadata about contract and functions to be consumed by cargo-near. PR 831, PR 863, PR 858
  • Exposed ext_ft_metadata to call FungibleTokenMetadataProvider trait from an external contract. PR 836

Fixed

  • Safe math fixes for fungible token standard. PR 830
    • This just ensures that there is no overflow if overflow-checks is not enabled by cargo

Changed

  • Enabled const-generics feature by default on borsh. PR 828
  • License changed from GPL-3 to MIT or Apache. PR 837
  • Put unit-testing logic behind unit-testing flag, which is enabled by default. PR 870
    • This pulls in nearcore dependencies to mock the VM, so can turn off default-features to compile faster

Removed

  • Deprecated near_contract_standards::upgrade. PR 856
    • Implementation did not match any NEAR standard and was not correct

4.0.0

25 May 13:41
Compare
Choose a tag to compare

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

4.0.0-pre.9

12 May 15:21
Compare
Choose a tag to compare
4.0.0-pre.9 Pre-release
Pre-release

Fixes

  • near-contract-standards: nft_tokens in enumeration standard no longer panics when there are no tokens PR 798
  • Optimized nth operation for UnorderedMap iterator and implemented IntoIterator for it. PR 801
    • This optimizes the skip operation, which is common with pagination