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

feat: Implement get account proof endpoint #556

Open
wants to merge 17 commits into
base: next
Choose a base branch
from

Conversation

igamigo
Copy link
Collaborator

@igamigo igamigo commented Oct 18, 2024

No description provided.

@igamigo igamigo changed the title feat: Implement get account state endpoint feat: Implement get account proof endpoint Oct 18, 2024
@igamigo igamigo marked this pull request as ready for review October 22, 2024 17:57
Copy link
Collaborator

@tomyrd tomyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left a small comment

crates/rust-client/src/rpc/web_tonic_client/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! Not a super-deep review from me, but I left a couple of comments inline.

crates/rust-client/src/rpc/domain/accounts.rs Show resolved Hide resolved
Comment on lines 138 to 148
/// Represents a proof of existence of an account's state at a specific block number.
pub struct AccountProof {
/// Account ID.
account_id: AccountId,
/// Authentication path from the `account_root` of the block header to the account.
merkle_proof: MerklePath,
/// Account hash for the current state.
account_hash: Digest,
/// State headers of public accounts.
state_headers: Option<(AccountHeader, AccountStorageHeader, Option<AccountCode>)>,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be defined in the domain module?

Copy link
Collaborator

@tomyrd tomyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left a comment with a possible change, but maybe it's not a worthwhile refactor.

crates/rust-client/src/rpc/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@tomyrd tomyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants