-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: release v5.0.0-alpha.1 (#1070)
- Loading branch information
Showing
22 changed files
with
126 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,12 @@ use near_sdk::{near_bindgen, NearSchema}; | |
|
||
#[derive(NearSchema, Serialize, Deserialize, BorshDeserialize, BorshSerialize)] | ||
#[borsh(crate = "near_sdk::borsh")] | ||
#[serde(crate = "near_sdk::serde")] | ||
#[abi(json, borsh)] | ||
pub struct Pair(u32, u32); | ||
|
||
#[derive(NearSchema, Serialize, Deserialize)] | ||
#[serde(crate = "near_sdk::serde")] | ||
#[abi(json, borsh)] | ||
pub struct DoublePair { | ||
first: Pair, | ||
|
@@ -63,28 +65,28 @@ mod tests { | |
let res = contract.view("__contract_abi").await?; | ||
|
||
let abi_root = | ||
serde_json::from_slice::<AbiRoot>(&zstd::decode_all(&res.result[..])?).unwrap(); | ||
serde_json::from_slice::<AbiRoot>(&zstd::decode_all(&res.result[..])?)?; | ||
|
||
assert_eq!(abi_root.schema_version, "0.3.0"); | ||
assert_eq!(abi_root.metadata.name, Some("adder".to_string())); | ||
assert_eq!(abi_root.metadata.version, Some("0.1.0".to_string())); | ||
assert_eq!( | ||
&abi_root.metadata.authors[..], | ||
&["Near Inc <[email protected]>".to_string()] | ||
&["Near Inc <[email protected]>"] | ||
); | ||
assert_eq!(abi_root.body.functions.len(), 3); | ||
|
||
let add_function = &abi_root.body.functions[0]; | ||
|
||
assert_eq!(add_function.name, "add".to_string()); | ||
assert_eq!(add_function.name, "add"); | ||
assert_eq!(add_function.doc, Some(" Adds two pairs point-wise.".to_string())); | ||
assert_eq!(add_function.kind, AbiFunctionKind::View); | ||
assert_eq!(add_function.modifiers, vec![]); | ||
assert_eq!(add_function.modifiers, &[]); | ||
match &add_function.params { | ||
AbiParameters::Json { args } => { | ||
assert_eq!(args.len(), 2); | ||
assert_eq!(args[0].name, "a".to_string()); | ||
assert_eq!(args[1].name, "b".to_string()); | ||
assert_eq!(args[0].name, "a"); | ||
assert_eq!(args[1].name, "b"); | ||
} | ||
AbiParameters::Borsh { .. } => { | ||
assert!(false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,3 @@ opt-level = "z" | |
lto = true | ||
debug = false | ||
panic = "abort" | ||
|
||
[workspace] | ||
members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,3 @@ opt-level = "z" | |
lto = true | ||
debug = false | ||
panic = "abort" | ||
|
||
[workspace] | ||
members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,3 @@ opt-level = "z" | |
lto = true | ||
debug = false | ||
panic = "abort" | ||
|
||
[workspace] | ||
members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,3 @@ opt-level = "z" | |
lto = true | ||
debug = false | ||
panic = "abort" | ||
|
||
[workspace] | ||
members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [5.0.0-alpha.1](https://github.com/near/near-sdk-rs/compare/4.1.1...near-contract-standards-v5.0.0-alpha.1) - 2023-11-18 | ||
|
||
### Added | ||
- adding `nep-0330` contract source metadata info ([#1106](https://github.com/near/near-sdk-rs/pull/1106)) | ||
|
||
### Fixed | ||
- remove receiver approval ([#1020](https://github.com/near/near-sdk-rs/pull/1020)) | ||
- rename param `approvals` to `approved_account_ids` ([#1019](https://github.com/near/near-sdk-rs/pull/1019)) | ||
- Properly report an error when Approval Extension is not enabled vs when account is not approved ([#1021](https://github.com/near/near-sdk-rs/pull/1021)) | ||
|
||
### Other | ||
- [**breaking**] Use type-safe NearToken instead of u128/U128 ([#1104](https://github.com/near/near-sdk-rs/pull/1104)) | ||
- migrate to a external near-account-id crate for reusable AccountId type ([#1108](https://github.com/near/near-sdk-rs/pull/1108)) | ||
- Update borsh to 1.0.0 ([#1075](https://github.com/near/near-sdk-rs/pull/1075)) | ||
- Move from Gas to NearGas from near-gas crate ([#1082](https://github.com/near/near-sdk-rs/pull/1082)) | ||
- Deprecate Fungible Token declarative macros. ([#1054](https://github.com/near/near-sdk-rs/pull/1054)) | ||
- Add release-plz to automate releases ([#1069](https://github.com/near/near-sdk-rs/pull/1069)) | ||
- *(contract-standards)* deprecate declarative macros in NFT helpers, promote explicit trait implementations instead ([#1042](https://github.com/near/near-sdk-rs/pull/1042)) | ||
- Added a default method for TokenMetadata ([#978](https://github.com/near/near-sdk-rs/pull/978)) | ||
- Removed the not ready enum type ([#977](https://github.com/near/near-sdk-rs/pull/977)) | ||
- Fix empty owner tokens `start_index` error ([#962](https://github.com/near/near-sdk-rs/pull/962)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.