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

fix: correctly handle contract without storage items #2

Closed
wants to merge 3 commits into from

Conversation

whichqua
Copy link

@whichqua whichqua commented Sep 26, 2024

Problem: pathfinder returns an internal error when one tries to fetch a proof for contract without storage items.

Solution: Early return when the root is none.

Problem: pathfinder returns an internal error when one tries to fetch a proof for contract without storage items.

Solution: Early return when the root is none.
@whichqua whichqua changed the base branch from od/rpc/feat/get-class-proof to snos_requirements October 1, 2024 13:58
@@ -245,6 +249,7 @@ pub async fn get_proof(
input.contract_address,
header.number,
k.view_bits(),
root.unwrap()
Copy link

Choose a reason for hiding this comment

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

I'd add a comment about this unwrap not failing because of lines 221

Copy link
Author

Choose a reason for hiding this comment

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

I will convert to .expect which implies infalability

@whichqua
Copy link
Author

whichqua commented Oct 1, 2024

Fixed in favour of #3

@whichqua whichqua closed this Oct 1, 2024
@whichqua whichqua deleted the gm/contract-without-storage-items branch October 1, 2024 16:40
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.

2 participants