Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump borsh version and other deps #271

Merged
merged 2 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
toolchain: [stable, 1.60.0]
toolchain: [stable, 1.68.0]

runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## Requirements

- Rust v1.60.0 and up
- Rust v1.68.0 and up
- MacOS (x86 and M1) or Linux (x86) for sandbox tests.

### WASM compilation not supported
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dev-dependencies]
anyhow = "1.0"
borsh = "0.9"
borsh = "0.10"
maplit = "1.0"
near-units = "0.2.0"
serde = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/src/ref_finance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async fn create_custom_ft(
.await?;

// Initialize our FT contract with owner metadata and total supply available
// to be traded and transfered into other contracts such as Ref-Finance
// to be traded and transferred into other contracts such as Ref-Finance
ft.call("new_default_meta")
.args_json(json!({
"owner_id": owner.id(),
Expand Down
18 changes: 9 additions & 9 deletions workspaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Library for automating workflows and testing NEAR smart contracts.
async-trait = "0.1"
async-process = "1.3"
base64 = "0.13"
borsh = "0.9"
borsh = "0.10"
bs58 = "0.4"
cargo_metadata = { version = "0.14.2", optional = true }
cargo_metadata = { version = "0.15.4", optional = true }
chrono = "0.4.19"
fs2 = "0.4"
hex = "0.4.2"
Expand All @@ -24,19 +24,19 @@ rand = "0.8.4"
reqwest = { version = "0.11", features = ["json"] }
serde = "1.0"
serde_json = "1.0"
json-patch = "0.2"
json-patch = "1.0"
tempfile = "3.3"
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
tokio-retry = "0.3"
tracing = "0.1"
url = { version = "2.2.2", features = ["serde"] }

near-account-id = "0.15.0"
near-crypto = "0.15.0"
near-primitives = "0.15.0"
near-jsonrpc-primitives = "0.15.0"
near-jsonrpc-client = { version = "0.4.1", features = ["sandbox"] }
near-account-id = "0.16"
near-crypto = "0.16"
near-primitives = "0.16"
near-jsonrpc-primitives = "0.16"
near-jsonrpc-client = { version = "0.5", features = ["sandbox"] }
near-sandbox-utils = "0.6.2"

[build-dependencies]
Expand All @@ -47,7 +47,7 @@ libc = "0.2"

[dev-dependencies]
anyhow = "1.0"
borsh = "0.9"
borsh = "0.10"
futures = "0.3"
near-units = "0.2.0"
near-sdk = "4.0.0"
Expand Down
6 changes: 2 additions & 4 deletions workspaces/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ use std::str::FromStr;

use borsh::{BorshDeserialize, BorshSerialize};
pub use near_account_id::AccountId;
use near_primitives::logging::pretty_hash;
use near_primitives::serialize::to_base58;
use serde::{Deserialize, Serialize};

use crate::error::{Error, ErrorKind};
Expand Down Expand Up @@ -286,13 +284,13 @@ impl TryFrom<Vec<u8>> for CryptoHash {

impl Debug for CryptoHash {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", pretty_hash(&self.to_string()))
write!(f, "{}", self)
}
}

impl Display for CryptoHash {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Display::fmt(&to_base58(self.0), f)
Display::fmt(&bs58::encode(self.0).into_string(), f)
}
}

Expand Down