Skip to content

Commit

Permalink
bumped dependencies to the latest stable
Browse files Browse the repository at this point in the history
  • Loading branch information
frol committed Feb 22, 2024
1 parent 9c5089d commit 36fa20c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions near-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Main macro of the library for writing NEAR smart contracts.
proc-macro = true

[dependencies]
proc-macro2 = "1"
syn = { version = "2", features = ["full", "fold", "extra-traits", "visit"] }
strum = "0.24"
strum_macros = "0.24"
quote = "1.0"
proc-macro2 = { version = "1", default-features = false }
syn = { version = "2", default-features = false }
strum = { version = "0.26", default-features = false }
strum_macros = "0.26"
quote = { version = "1.0", default-features = false }
Inflector = { version = "0.11.4", default-features = false, features = [] }
darling = { version = "0.20.3" }
serde = { version = "1", features = ["derive"] }
darling = { version = "0.20.3", default-features = false }
serde = { version = "1", default-features = false, features = ["serde_derive"] }
serde_json = "1"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions near-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
near-sdk-macros = { path = "../near-sdk-macros", version = "~5.0.0-alpha.3" }
near-sys = { path = "../near-sys", version = "0.2.1" }
base64 = "0.13"
base64 = "0.21"
borsh = { version = "1.0.0", features = ["derive"] }
bs58 = "0.4"
bs58 = "0.5"

# Used for caching, might be worth porting only functionality needed.
once_cell = { version = "1.17", default-features = false }
Expand Down Expand Up @@ -60,7 +60,7 @@ getrandom = { version = "0.2", features = ["js"] }
rand_chacha = "0.3.1"
near-rng = "0.1.1"
near-abi = { version = "0.4.0", features = ["__chunked-entries"] }
symbolic-debuginfo = "8.8"
symbolic-debuginfo = "12"

[features]
default = ["wee_alloc"]
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/json_types/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl std::str::FromStr for Base58CryptoHash {

fn from_str(value: &str) -> Result<Self, Self::Err> {
let mut crypto_hash: CryptoHash = CryptoHash::default();
let size = bs58::decode(value).into(&mut crypto_hash)?;
let size = bs58::decode(value).onto(&mut crypto_hash)?;
if size != std::mem::size_of::<CryptoHash>() {
return Err(ParseCryptoHashError {
kind: ParseCryptoHashErrorKind::InvalidLength(size),
Expand Down
5 changes: 3 additions & 2 deletions near-sdk/src/json_types/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,22 @@ impl schemars::JsonSchema for Base64VecU8 {
/// ```
mod base64_bytes {
use super::*;
use base64::Engine;
use serde::de;

pub fn serialize<S>(bytes: &[u8], serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_str(&base64::encode(bytes))
serializer.serialize_str(&base64::engine::general_purpose::STANDARD.encode(bytes))
}

pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
where
D: Deserializer<'de>,
{
let s: String = Deserialize::deserialize(deserializer)?;
base64::decode(s.as_str()).map_err(de::Error::custom)
base64::engine::general_purpose::STANDARD.decode(s.as_str()).map_err(de::Error::custom)
}
}

Expand Down

0 comments on commit 36fa20c

Please sign in to comment.