-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new andpoint view_state_paginated
- Loading branch information
Showing
10 changed files
with
125 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ pub mod gas; | |
pub mod network; | ||
pub mod queries; | ||
pub mod receipts; | ||
pub mod state; | ||
pub mod transactions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use crate::config::ServerContext; | ||
use crate::errors::RPCError; | ||
use jsonrpc_v2::{Data, Params}; | ||
|
||
#[derive(serde::Serialize, serde::Deserialize, Debug)] | ||
pub struct RpcViewStatePaginatedRequest { | ||
#[serde(flatten)] | ||
pub block_reference: near_primitives::types::BlockReference, | ||
pub next_page: Option<String>, | ||
} | ||
|
||
#[derive(serde::Serialize, serde::Deserialize, Debug)] | ||
pub struct RpcQueryResponse { | ||
#[serde(flatten)] | ||
pub kind: near_jsonrpc_primitives::types::query::QueryResponseKind, | ||
pub block_height: near_primitives::types::BlockHeight, | ||
pub block_hash: near_primitives::hash::CryptoHash, | ||
pub next_page: Option<String>, | ||
} | ||
|
||
pub async fn view_state_paginated( | ||
data: Data<ServerContext>, | ||
Params(params): Params<RpcViewStatePaginatedRequest>, | ||
) -> Result<RpcQueryResponse, RPCError> { | ||
println!("{:?}", params); | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod methods; |