diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a65fff7c..fc04c6676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [4.0.0] - 2022-05-25 + ### Added - Added `Eq`, `PartialOrd`, `Ord` to `json_types` integer types. [PR 823](https://github.com/near/near-sdk-rs/pull/823) @@ -12,6 +15,12 @@ - `receipt_indices` field removed from `Receipt` type in testing utils - Deprecate and remove `near-sdk-sim`. Removes `sim` proxy struct from `#[near_bindgen]`. [PR 817](https://github.com/near/near-sdk-rs/pull/817) - If `near-sdk-sim` tests can't be migrated to [workspaces-rs](https://github.com/near/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](https://github.com/near/near-sdk-rs/pull/804) +- Switched Rust edition for libraries to `2021`. [PR 669](https://github.com/near/near-sdk-rs/pull/669) + +### Fixes +- Avoid loading result bytes with `near_sdk::is_promise_success()`. [PR 816](https://github.com/near/near-sdk-rs/pull/816) + ## [4.0.0-pre.9] - 2022-05-12 @@ -282,8 +291,9 @@ impl StatusMessage { * In fungible token remove account from storage if its balance is 0 https://github.com/near/near-sdk-rs/pull/179 [Unreleased]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.9...HEAD -[4.0.0-pre.9] https://github.com/near/near-sdk-rs/compare/4.0.0-pre.8...4.0.0-pre.9 -[4.0.0-pre.8] https://github.com/near/near-sdk-rs/compare/4.0.0-pre.7...4.0.0-pre.8 +[4.0.0]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.9...4.0.0 +[4.0.0-pre.9]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.8...4.0.0-pre.9 +[4.0.0-pre.8]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.7...4.0.0-pre.8 [4.0.0-pre.7]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.6...4.0.0-pre.7 [4.0.0-pre.6]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.5...4.0.0-pre.6 [4.0.0-pre.5]: https://github.com/near/near-sdk-rs/compare/4.0.0-pre.4...4.0.0-pre.5 diff --git a/examples/callback-results/Cargo.lock b/examples/callback-results/Cargo.lock index 3d4b835ed..55fa9f80e 100644 --- a/examples/callback-results/Cargo.lock +++ b/examples/callback-results/Cargo.lock @@ -1615,7 +1615,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1633,7 +1633,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/callback-results/res/callback_results.wasm b/examples/callback-results/res/callback_results.wasm index 2a4a991a1..86a9934d0 100755 Binary files a/examples/callback-results/res/callback_results.wasm and b/examples/callback-results/res/callback_results.wasm differ diff --git a/examples/cross-contract-calls/Cargo.lock b/examples/cross-contract-calls/Cargo.lock index 1224b783c..80202372b 100644 --- a/examples/cross-contract-calls/Cargo.lock +++ b/examples/cross-contract-calls/Cargo.lock @@ -1666,7 +1666,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/cross-contract-calls/res/cross_contract_high_level.wasm b/examples/cross-contract-calls/res/cross_contract_high_level.wasm index aa9113adf..5cc50327f 100755 Binary files a/examples/cross-contract-calls/res/cross_contract_high_level.wasm and b/examples/cross-contract-calls/res/cross_contract_high_level.wasm differ diff --git a/examples/cross-contract-calls/res/cross_contract_low_level.wasm b/examples/cross-contract-calls/res/cross_contract_low_level.wasm index 0137db3fd..49b37c4be 100755 Binary files a/examples/cross-contract-calls/res/cross_contract_low_level.wasm and b/examples/cross-contract-calls/res/cross_contract_low_level.wasm differ diff --git a/examples/factory-contract/Cargo.lock b/examples/factory-contract/Cargo.lock index b53cc1fc1..eaecc6bde 100644 --- a/examples/factory-contract/Cargo.lock +++ b/examples/factory-contract/Cargo.lock @@ -1666,7 +1666,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/factory-contract/res/factory_contract_high_level.wasm b/examples/factory-contract/res/factory_contract_high_level.wasm index 17e1e95a2..04ca0f045 100755 Binary files a/examples/factory-contract/res/factory_contract_high_level.wasm and b/examples/factory-contract/res/factory_contract_high_level.wasm differ diff --git a/examples/factory-contract/res/factory_contract_low_level.wasm b/examples/factory-contract/res/factory_contract_low_level.wasm index 4a5c43ce7..cf233a40c 100755 Binary files a/examples/factory-contract/res/factory_contract_low_level.wasm and b/examples/factory-contract/res/factory_contract_low_level.wasm differ diff --git a/examples/fungible-token/Cargo.lock b/examples/fungible-token/Cargo.lock index 4b4c99024..e769990fe 100644 --- a/examples/fungible-token/Cargo.lock +++ b/examples/fungible-token/Cargo.lock @@ -1390,7 +1390,7 @@ dependencies = [ [[package]] name = "near-contract-standards" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "near-sdk", "serde", @@ -1772,7 +1772,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1790,7 +1790,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/fungible-token/res/defi.wasm b/examples/fungible-token/res/defi.wasm index 78edf0250..aefa8c80a 100755 Binary files a/examples/fungible-token/res/defi.wasm and b/examples/fungible-token/res/defi.wasm differ diff --git a/examples/fungible-token/res/fungible_token.wasm b/examples/fungible-token/res/fungible_token.wasm index 59ae40f6a..494035f69 100755 Binary files a/examples/fungible-token/res/fungible_token.wasm and b/examples/fungible-token/res/fungible_token.wasm differ diff --git a/examples/lockable-fungible-token/Cargo.lock b/examples/lockable-fungible-token/Cargo.lock index 5c3aa749d..60e7ea173 100644 --- a/examples/lockable-fungible-token/Cargo.lock +++ b/examples/lockable-fungible-token/Cargo.lock @@ -1745,7 +1745,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1763,7 +1763,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/lockable-fungible-token/res/lockable_fungible_token.wasm b/examples/lockable-fungible-token/res/lockable_fungible_token.wasm index 1d7f41265..e1bb81f53 100755 Binary files a/examples/lockable-fungible-token/res/lockable_fungible_token.wasm and b/examples/lockable-fungible-token/res/lockable_fungible_token.wasm differ diff --git a/examples/mission-control/Cargo.lock b/examples/mission-control/Cargo.lock index 9251f2884..35b8ffae9 100644 --- a/examples/mission-control/Cargo.lock +++ b/examples/mission-control/Cargo.lock @@ -560,7 +560,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -578,7 +578,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/mission-control/res/mission_control.wasm b/examples/mission-control/res/mission_control.wasm index d95069835..a0270fa16 100755 Binary files a/examples/mission-control/res/mission_control.wasm and b/examples/mission-control/res/mission_control.wasm differ diff --git a/examples/non-fungible-token/Cargo.lock b/examples/non-fungible-token/Cargo.lock index 4a4e05df0..2ff465b69 100644 --- a/examples/non-fungible-token/Cargo.lock +++ b/examples/non-fungible-token/Cargo.lock @@ -1367,7 +1367,7 @@ dependencies = [ [[package]] name = "near-contract-standards" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "near-sdk", "serde", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -1767,7 +1767,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/non-fungible-token/res/approval_receiver.wasm b/examples/non-fungible-token/res/approval_receiver.wasm index 292a6936c..c95115828 100755 Binary files a/examples/non-fungible-token/res/approval_receiver.wasm and b/examples/non-fungible-token/res/approval_receiver.wasm differ diff --git a/examples/non-fungible-token/res/non_fungible_token.wasm b/examples/non-fungible-token/res/non_fungible_token.wasm index e8c6ef899..aa1c4d01d 100755 Binary files a/examples/non-fungible-token/res/non_fungible_token.wasm and b/examples/non-fungible-token/res/non_fungible_token.wasm differ diff --git a/examples/non-fungible-token/res/token_receiver.wasm b/examples/non-fungible-token/res/token_receiver.wasm index d1eb822c0..6c9bb6b6d 100755 Binary files a/examples/non-fungible-token/res/token_receiver.wasm and b/examples/non-fungible-token/res/token_receiver.wasm differ diff --git a/examples/status-message-collections/Cargo.lock b/examples/status-message-collections/Cargo.lock index a978b12ea..bc7d7dbef 100644 --- a/examples/status-message-collections/Cargo.lock +++ b/examples/status-message-collections/Cargo.lock @@ -553,7 +553,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -571,7 +571,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/status-message-collections/res/status_message_collections.wasm b/examples/status-message-collections/res/status_message_collections.wasm index e2de51607..a76c8da31 100755 Binary files a/examples/status-message-collections/res/status_message_collections.wasm and b/examples/status-message-collections/res/status_message_collections.wasm differ diff --git a/examples/status-message/Cargo.lock b/examples/status-message/Cargo.lock index 80b125a7c..48ebb2f04 100644 --- a/examples/status-message/Cargo.lock +++ b/examples/status-message/Cargo.lock @@ -553,7 +553,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -571,7 +571,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/status-message/res/status_message.wasm b/examples/status-message/res/status_message.wasm index 97420e68d..ec9da0f0d 100755 Binary files a/examples/status-message/res/status_message.wasm and b/examples/status-message/res/status_message.wasm differ diff --git a/examples/test-contract/Cargo.lock b/examples/test-contract/Cargo.lock index 8724f52f2..278d7add1 100644 --- a/examples/test-contract/Cargo.lock +++ b/examples/test-contract/Cargo.lock @@ -553,7 +553,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -571,7 +571,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/test-contract/res/test_contract.wasm b/examples/test-contract/res/test_contract.wasm index f6cd2fbec..9d0669236 100755 Binary files a/examples/test-contract/res/test_contract.wasm and b/examples/test-contract/res/test_contract.wasm differ diff --git a/examples/versioned/Cargo.lock b/examples/versioned/Cargo.lock index 8c51dd395..785853a17 100644 --- a/examples/versioned/Cargo.lock +++ b/examples/versioned/Cargo.lock @@ -560,7 +560,7 @@ dependencies = [ [[package]] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "base64 0.13.0", "borsh", @@ -579,7 +579,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" dependencies = [ "Inflector", "proc-macro2", diff --git a/examples/versioned/res/versioned.wasm b/examples/versioned/res/versioned.wasm index e3c362bdf..d81af9700 100755 Binary files a/examples/versioned/res/versioned.wasm and b/examples/versioned/res/versioned.wasm differ diff --git a/near-contract-standards/Cargo.toml b/near-contract-standards/Cargo.toml index b2e8d10b8..c2c68a439 100644 --- a/near-contract-standards/Cargo.toml +++ b/near-contract-standards/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "near-contract-standards" -version = "4.0.0-pre.9" +version = "4.0.0" authors = ["Near Inc "] edition = "2021" license = "GPL-3.0" @@ -13,6 +13,6 @@ NEAR smart contracts standard library. """ [dependencies] -near-sdk = { path = "../near-sdk", version = "=4.0.0-pre.9" } +near-sdk = { path = "../near-sdk", version = "=4.0.0" } serde = "1" serde_json = "1" diff --git a/near-sdk-macros/Cargo.toml b/near-sdk-macros/Cargo.toml index c160ab4a2..8bccfe61c 100644 --- a/near-sdk-macros/Cargo.toml +++ b/near-sdk-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "near-sdk-macros" -version = "4.0.0-pre.9" +version = "4.0.0" authors = ["Near Inc "] edition = "2021" license = "MIT OR Apache-2.0" diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml index 69a710b79..f5c905750 100644 --- a/near-sdk/Cargo.toml +++ b/near-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "near-sdk" -version = "4.0.0-pre.9" +version = "4.0.0" authors = ["Near Inc "] edition = "2021" license = "GPL-3.0" @@ -20,7 +20,7 @@ path = "compilation_tests/all.rs" # Provide near_bidgen macros. serde = { version = "1", features = ["derive"] } serde_json = "1" -near-sdk-macros = { path = "../near-sdk-macros", version = "=4.0.0-pre.9" } +near-sdk-macros = { path = "../near-sdk-macros", version = "=4.0.0" } near-sys = { path = "../sys", version = "0.2" } base64 = "0.13" borsh = "0.9"