From d77eb67f61dc1e3e63b7503784228b49cb15e0be Mon Sep 17 00:00:00 2001 From: Artur Yurii Korchynskyi <42449190+akorchyn@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:35:50 +0200 Subject: [PATCH] chore: fixed test compilation (#165) * chore: fixed test compilation * doc fix --- Cargo.toml | 4 ++-- src/methods/chunk.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 65c6654..88be9f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,12 +15,12 @@ log = "0.4.17" borsh = "1.3.0" serde = "1.0.145" reqwest = { version = "0.12", features = ["json"], default-features = false } -thiserror = "1.0.37" +thiserror = "2.0" serde_json = "1.0.85" lazy_static = "1.4.0" near-crypto = ">0.22,<0.29" -near-primitives = ">0.22,<0.29" +near-primitives = { version = ">0.22,<0.29", features = ["test_utils"] } near-chain-configs = ">0.22,<0.29" near-jsonrpc-primitives = ">0.22,<0.29" diff --git a/src/methods/chunk.rs b/src/methods/chunk.rs index af076d2..d21902e 100644 --- a/src/methods/chunk.rs +++ b/src/methods/chunk.rs @@ -13,7 +13,7 @@ //! ``` //! use near_jsonrpc_client::{methods, JsonRpcClient}; //! use near_jsonrpc_primitives::types::chunks; -//! use near_primitives::types::BlockId; +//! use near_primitives::types::{BlockId, ShardId}; //! //! # #[tokio::main] //! # async fn main() -> Result<(), Box> { @@ -22,7 +22,7 @@ //! let request = methods::chunk::RpcChunkRequest { //! chunk_reference: chunks::ChunkReference::BlockShardId { //! block_id: BlockId::Hash("6atGq4TUTZerVHU9qWoYfzXNBg3K4C4cca15TE6KfuBr".parse()?), -//! shard_id: 0, +//! shard_id: ShardId::from(0), //! } //! }; //! @@ -41,7 +41,7 @@ //! ``` //! use near_jsonrpc_client::{methods, JsonRpcClient}; //! use near_jsonrpc_primitives::types::chunks; -//! use near_primitives::types::BlockId; +//! use near_primitives::types::{BlockId, ShardId}; //! //! # #[tokio::main] //! # async fn main() -> Result<(), Box> { @@ -50,7 +50,7 @@ //! let request = methods::chunk::RpcChunkRequest { //! chunk_reference: chunks::ChunkReference::BlockShardId { //! block_id: BlockId::Height(61512623), -//! shard_id: 3, +//! shard_id: ShardId::from(3), //! } //! }; //!