Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 30, 2024

Bumps near-sdk from 4.0.0 to 5.1.0.

Release notes

Sourced from near-sdk's releases.

near-sdk-macros-v5.1.0

No release notes provided.

near-sdk-v5.1.0

Hightlights

Reduce your boilderpate and enable ABI support out of the box with the new #[near] macro-attribute.

use near_sdk::serde::{Deserialize, Serialize}
use near_sdk::borsh::{BorshDeserialize, BorshSerialize};
use near_sdk::schemars::JsonSchema;
#[derive(Deserialize, Serialize, JsonSchema, BorshDeserlialize, BorshSerialize)]
#[serde(crate = "near_sdk::serde")]
#[schemars(crate = "near_sdk::schemars")]
#[borsh(crate = "near_sdk::borsh")]
struct ...

use near_sdk::near;
#[near(serializers = [borsh, json])]
struct ...

use near_sdk::{near_bindgen, env};

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "near_sdk::borsh")]
pub struct StatusMessage {
    records: HashMap<AccountId, String>,
}
</tr></table> 

... (truncated)

Changelog

Sourced from near-sdk's changelog.

5.1.0 - 2024-03-28

Added

  • Finalize #[near] attribute-macro implementation with the support for custom parameters passing to serializer attributes #[near(serializers = [borsh(...)])] (#1158)
  • Introduce #[near] macro to further streamline contracts development reducing the boilerplate! (#1142)

Other

  • add typo checker in ci (#1159)

5.0.0 - 2024-02-21

Highlights

This release mostly maintains backwards compatibility with the previous version, but it also includes several breaking changes that improve developer experience and bring security and performance fixes. The most notable changes are:

  • Contract source metadata (NEP-330) is now implemented by default for all the contracts out of the box, which means that you can call contract_source_metadata() function and receive { version?: string, link?: string, standards?: { standard: string, version: string }[] } (#1106)
  • Type-safe NEAR balance, gas amounts, and account ids were implemented:
  • Update borsh to 1.0.0 (#1075)
    • You will have to be explicit about the borsh re-export with #[borsh(crate = "near_sdk::borsh")], see the example in the README
  • New host functions exposed:
  • Slimmed down the dependencies by default, most notably, you may still need to explicitly enable legacy feature for near_sdk::collections and unit-testing feature for near_sdk::testing_env and near_sdk::mock (#1149)
  • Updated nearcore crates from 0.17 -> 0.20, but contracts rarely use these directly so no breaking changes are expected (#1130)
  • Support Result types in #[handle_result] regardless of how they're referred to (#1099)
  • Self is now prohibited in non-init methods to prevent common footguns (#1073)
  • Require explicit Unlimited or Limited when specifying allowances to prevent 0 to be silently treated as unlimited allowance (#976)
  • Performance improvement to TreeMap.range (#964)
  • Deprecated near_sdk::store::UnorderedMap and near_sdk::store::UnorderedSet due to not meeting the original requirements (iteration over a collection of more than 2k elements runs out of gas) (#1139)
  • Deprecated near_sdk::collections::LegacyTreeMap (#963)

The best way to develop NEAR contracts in Rust is by using cargo-near CLI. It provides a convenient way to create, build, test, and deploy contracts!

Get your fully configured development environment in under 1 minute using GitHub CodeSpaces configured for NEAR!

5.0.0-alpha.3 - 2024-02-19

Fixed

  • Deprecated store::UnorderedMap and store::UnorderedSet due to not meeting the original requirements (iteration over a collection of more than 2k elements runs out of gas) (#1139)

Other

  • Added ABI tests for SDK-generated methods [contract_source_metadata] (#1136)

5.0.0-alpha.2 - 2024-01-16

Fixed

... (truncated)

Commits
  • 9aa5eb0 chore: release v5.1.0 (#1157)
  • 053aa5b chore: add typo checker in ci (#1159)
  • c87582f feat: Finalize #[near] attribute-macro implementation with the support for ...
  • 1408127 feat: Introduce #[near] macro to further streamline contracts development r...
  • 9bb16c2 release: v5.0.0 (#1148)
  • c157688 refactor: Slimmed down the dependencies by default (#1149)
  • 5999e12 chore: release v5.0.0-alpha.3 (#1138)
  • c522c19 fix: Fixed a typo in the storage_deposit refund computation (introduced in 5....
  • 61b9590 fix: Deprecated store::UnorderedMap and store::UnorderedSet due to not me...
  • e78e06a chore: Downgrade clap dependency to test MSRV (#1140)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [near-sdk](https://github.com/near/near-sdk-rs) from 4.0.0 to 5.1.0.
- [Release notes](https://github.com/near/near-sdk-rs/releases)
- [Changelog](https://github.com/near/near-sdk-rs/blob/master/CHANGELOG.md)
- [Commits](near/near-sdk-rs@4.0.0...near-sdk-v5.1.0)

---
updated-dependencies:
- dependency-name: near-sdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 30, 2024
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 4, 2024

Superseded by #133.

@dependabot dependabot bot closed this Jul 4, 2024
@dependabot dependabot bot deleted the dependabot/cargo/near-sdk-5.1.0 branch July 4, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant