Skip to content

Commit

Permalink
chore: update near-sdk, near-abi, borsh version
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Oct 12, 2023
1 parent e26f74e commit 3694f60
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 149 deletions.
64 changes: 59 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cargo-near/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ serde_json = "1.0"
sha2 = "0.10"
symbolic-debuginfo = "8.8"
schemars = "0.8"
near-abi = { version = "0.3.0", features = ["__chunked-entries"] }
near-abi = { version = "0.4.0", features = ["__chunked-entries"] }
libloading = "0.7.3"
zstd = "0.11"
atty = "0.2.14"
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ publish = false

[dependencies]
const_format = "0.2"
near-abi = "0.3.0"
near-abi = "0.4.0"

[dev-dependencies]
borsh = "0.9"
borsh = { version = "1.0.0", features = ["derive", "unstable__schema"]}
camino = "1.1.1"
cargo-near = { path = "../cargo-near" }
color-eyre = "0.6"
Expand Down
16 changes: 9 additions & 7 deletions integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
use const_format::formatcp;

pub const SDK_VERSION: &str = "4.1.0";
pub const SDK_GIT_REV: &str = "10b0dea3b1a214d789cc90314aa814a4181610ad";
// NOTE: this version is version of near-sdk in master branch from 5.x.x development cycle
pub const SDK_VERSION: &str = "4.1.1";
pub const SDK_GIT_REV: &str = "15bfb0e6d54ff386478d137074027c2cb863df03";
pub const SDK_VERSION_TOML: &str = formatcp!(r#"version = "{SDK_VERSION}""#);
pub const SDK_GIT_VERSION_TOML_COMMA: &str = formatcp!(
r#"version = "{SDK_VERSION}", git = "https://github.com/near/near-sdk-rs.git", rev = "{SDK_GIT_REV}""#
);
pub const SDK_GIT_VERSION_TOML_TABLE: &str = formatcp!(
r#"
version = "{SDK_VERSION}"
Expand All @@ -27,6 +31,7 @@ macro_rules! invoke_cargo_near {
cargo_vars.insert("sdk-version", $crate::SDK_VERSION);
cargo_vars.insert("sdk-git-rev", $crate::SDK_GIT_REV);
cargo_vars.insert("sdk-version-toml", $crate::SDK_VERSION_TOML);
cargo_vars.insert("sdk-git-version-toml-comma", $crate::SDK_GIT_VERSION_TOML_COMMA);
cargo_vars.insert("sdk-git-version-toml-table", $crate::SDK_GIT_VERSION_TOML_TABLE);
cargo_vars.insert("name", function_name!());
for (k, v) in cargo_vars {
Expand Down Expand Up @@ -109,15 +114,12 @@ macro_rules! generate_abi_fn_with {
$crate::generate_abi_with! {
$(Cargo: $cargo_path;)? $(Vars: $cargo_vars;)? $(Opts: $cli_opts;)?
Code:
// fixme! remove after borsh fixes trait qualification
// fixme! https://github.com/near/borsh-rs/issues/112
use near_sdk::borsh::BorshSchema;

use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
use near_sdk::borsh::{BorshDeserialize, BorshSerialize};
use near_sdk::near_bindgen;

#[near_bindgen]
#[derive(Default, BorshDeserialize, BorshSerialize)]
#[borsh(crate = "near_sdk::borsh")]
pub struct Contract {}

#[near_bindgen]
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/templates/_Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
near-sdk = { features = ["unstable"], ::sdk-version-toml:: }
# near-sdk = { features = ["unstable"], ::sdk-version-toml:: }
near-sdk = { features = ["unstable"], ::sdk-git-version-toml-comma:: }
serde = { version = "1", features = ["derive"] }
schemars = "0.8"

Expand Down
Loading

0 comments on commit 3694f60

Please sign in to comment.