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

updated near-primitives and associated crates #122

Merged
merged 11 commits into from
Feb 24, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Updated nearcore dependencies to `0.16.0`, which now requires a MSRV of `1.67.1`. <https://github.com/near/near-jsonrpc-client-rs/pull/122>
- `ApiKey::new` no longer requres the input of a valid UUID. <https://github.com/near/near-jsonrpc-client-rs/pull/119>
- `Debug` on `ApiKey` doesn't reveal the key anymore. <https://github.com/near/near-jsonrpc-client-rs/pull/120>
- The `auth` module is no longer feature gated. <https://github.com/near/near-jsonrpc-client-rs/pull/119>
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/near/near-jsonrpc-client-rs"
description = "Lower-level API for interfacing with the NEAR Protocol via JSONRPC"
categories = ["asynchronous", "api-bindings", "network-programming"]
keywords = ["near", "api", "jsonrpc", "rpc", "async"]
rust-version = "1.64.0"
rust-version = "1.67.1"

# cargo-workspaces
[workspace.metadata.workspaces]
Expand All @@ -23,13 +23,13 @@ thiserror = "1.0.37"
serde_json = "1.0.85"
lazy_static = "1.4.0"

near-crypto = "0.15.0"
near-primitives = "0.15.0"
near-chain-configs = "0.15.0"
near-jsonrpc-primitives = "0.15.0"
near-crypto = "0.16.0"
near-primitives = "0.16.0"
near-chain-configs = "0.16.0"
near-jsonrpc-primitives = "0.16.0"

[dev-dependencies]
tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] }
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
env_logger = "0.9.1"

[features]
Expand Down
4 changes: 2 additions & 2 deletions src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub use adversarial::adv_check_store;
pub fn to_json<M: RpcMethod>(method: &M) -> Result<serde_json::Value, io::Error> {
let request_payload = near_jsonrpc_primitives::message::Message::request(
method.method_name().to_string(),
Some(method.params()?),
method.params()?,
);

Ok(json!(request_payload))
Expand Down Expand Up @@ -178,7 +178,7 @@ mod common {
tx: &near_primitives::transaction::SignedTransaction,
) -> Result<String, io::Error> {
Ok(near_primitives::serialize::to_base64(
&borsh::BorshSerialize::try_to_vec(&tx)?,
borsh::BorshSerialize::try_to_vec(&tx)?,
))
}

Expand Down
4 changes: 2 additions & 2 deletions src/methods/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mod tests {
Some(RpcQueryError::ContractExecutionError {
ref vm_error,
..
}) if vm_error.contains("FunctionCallError(MethodResolveError(MethodNotFound))")
}) if vm_error.contains("MethodResolveError(MethodNotFound)")
),
"this is unexpected: {:#?}",
response_err
Expand Down Expand Up @@ -179,7 +179,7 @@ mod tests {
ref vm_error,
block_height: 63503911,
..
}) if vm_error.contains("FunctionCallError(MethodResolveError(MethodEmptyName))")
}) if vm_error.contains("MethodResolveError(MethodEmptyName)")
),
"this is unexpected: {:#?}",
response_err
Expand Down