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(rpc): Introduce starknet_getMessagesStatus #2301

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

t00ts
Copy link
Contributor

@t00ts t00ts commented Oct 14, 2024

Introduce starknet_getMessagesStatus

Also introduces new L1BlockNumber for L1 block numbers to avoid confusion, as well as L1TransactionHash.

Closes #2243
Closes #2182

@t00ts t00ts added this to the JSON-RPC 0.8.0 milestone Oct 14, 2024
@t00ts t00ts force-pushed the t00ts/messaging-proxy branch 2 times, most recently from 8bb7b90 to 9ea20d2 Compare October 16, 2024 04:07
@t00ts t00ts changed the title Introduce rpc starknet_getMessagesStatus feat(rpc): Introduce starknet_getMessagesStatus Oct 16, 2024
@t00ts t00ts marked this pull request as ready for review October 16, 2024 04:11
@t00ts t00ts requested a review from a team as a code owner October 16, 2024 04:11
crates/storage/src/params.rs Outdated Show resolved Hide resolved
crates/ethereum/src/lib.rs Outdated Show resolved Hide resolved
crates/rpc/src/method/get_messages_status.rs Outdated Show resolved Hide resolved
crates/ethereum/src/lib.rs Outdated Show resolved Hide resolved
@t00ts t00ts force-pushed the t00ts/messaging-proxy branch 3 times, most recently from d069a6e to fb6f46d Compare October 22, 2024 09:07
Copy link
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

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

LGTM.

Thank you for your perseverance throughout the whole implementation of this method! 🎉

Comment on lines 438 to 448
impl From<Chain> for ChainId {
fn from(chain: Chain) -> Self {
match chain {
Chain::Mainnet => ChainId::MAINNET,
Chain::SepoliaTestnet => ChainId::SEPOLIA_TESTNET,
Chain::SepoliaIntegration => ChainId::SEPOLIA_INTEGRATION,
Chain::Custom => panic!("Custom chain is not supported"),
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this conversion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch!

Copy link
Contributor

@sistemd sistemd left a comment

Choose a reason for hiding this comment

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

Also introduces new L1BlockNumber for L1 block numbers to avoid confusion, as well as L1TransactionHash.

This is great! The only thing that would have made it only slightly greater is if these were separate PRs because it's easier to review that way 😄

No complaints though, just a small note for the future.

@t00ts t00ts merged commit 1468a6c into main Oct 23, 2024
7 checks passed
@t00ts t00ts deleted the t00ts/messaging-proxy branch October 23, 2024 06:35
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.

Introduce L1BlockNumber struct for Ethereum block numbers JSON-RPC 0.8.0: starknet_getMessagesStatus method
3 participants