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

bug: message_hash type #103

Open
jbcaron opened this issue Nov 20, 2024 · 0 comments
Open

bug: message_hash type #103

jbcaron opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jbcaron
Copy link
Collaborator

jbcaron commented Nov 20, 2024

Bug Report

types-rs version:

Current behavior:

The message_hash field in the L1HandlerTxnReceipt structure is currently defined as a u64.
This type is insufficient because L1 message hashes, a defined in ethereum-based, are represented as 256-bit values (H256).

Expected behavior:

the message_hash field should be defined as H256 to correctly represent the 256-bit nature of the hash

Steps to reproduce:

Related code:

/// receipt for l1 handler transaction
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub struct L1HandlerTxnReceipt<F> {
    /// The message hash as it appears on the L1 core contract
    #[serde(with = "NumAsHex")]
    pub message_hash: u64,
    #[serde(flatten)]
    pub common_receipt_properties: CommonReceiptProperties<F>,
}

Other information:

@jbcaron jbcaron added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant