-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added
view_receipt_record
rpc endpoint (#266)
* feat: added `view_receipt_record` rpc endpoint * chore: removed leftovers * feat: used appropriate metrics * feat: added proper response structure * docs(view_receipt_record): added new custom method
- Loading branch information
Showing
5 changed files
with
95 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
pub mod methods; | ||
|
||
#[derive(serde::Serialize, serde::Deserialize, Debug)] | ||
pub struct RpcReceiptRecordResponse { | ||
pub receipt_id: near_indexer_primitives::CryptoHash, | ||
pub parent_transaction_hash: near_indexer_primitives::CryptoHash, | ||
pub block_height: near_indexer_primitives::types::BlockHeight, | ||
pub shard_id: near_indexer_primitives::types::ShardId, | ||
} | ||
|
||
impl From<readnode_primitives::ReceiptRecord> for RpcReceiptRecordResponse { | ||
fn from(receipt: readnode_primitives::ReceiptRecord) -> Self { | ||
Self { | ||
receipt_id: receipt.receipt_id, | ||
parent_transaction_hash: receipt.parent_transaction_hash, | ||
block_height: receipt.block_height, | ||
shard_id: receipt.shard_id, | ||
} | ||
} | ||
} |