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(proof-sdk): Cleanup Hint API #998

Merged
merged 2 commits into from
Feb 4, 2025
Merged

feat(proof-sdk): Cleanup Hint API #998

merged 2 commits into from
Feb 4, 2025

Conversation

clabby
Copy link
Collaborator

@clabby clabby commented Feb 4, 2025

Overview

Cleans up the hint sending API to allow for a nice builder pattern, over the previous method of constructing the raw encoded hint and sending it directly to the HintWriterClient.

Old:

self.oracle
    .write(&HintType::L2AccountStorageProof.encode_with(&[
        block_number.to_be_bytes().as_ref(),
        address.as_slice(),
        slot.to_be_bytes::<32>().as_ref(),
    ]))
    .await
    .map_err(OracleProviderError::Preimage)

New:

HintType::L2AccountStorageProof
    .with_data(&[
        block_number.to_be_bytes().as_ref(),
        address.as_slice(),
        slot.to_be_bytes::<32>().as_ref(),
    ])
    .send(self.oracle.as_ref())
    .await

@clabby clabby added A-client Area: client binary K-feature Kind: feature labels Feb 4, 2025
@clabby clabby self-assigned this Feb 4, 2025
@clabby
Copy link
Collaborator Author

clabby commented Feb 4, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.1%. Comparing base (61ed147) to head (00dd261).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clabby clabby marked this pull request as ready for review February 4, 2025 17:56
@clabby clabby requested review from refcell and emhane as code owners February 4, 2025 17:56
Copy link
Collaborator

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Hell yes so clean

@refcell refcell added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit 241b210 Feb 4, 2025
16 checks passed
@refcell refcell deleted the cl/cleanup-hints branch February 4, 2025 23:12
This was referenced Feb 4, 2025
byteflyfunny pushed a commit to mantle-xyz/kona that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client binary K-feature Kind: feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants