Skip to content

Commit

Permalink
Add doc comments for L1HandlerTx (starkware-libs#1980)
Browse files Browse the repository at this point in the history
# Description

<!--
A description of what this PR is solving.
-->

## Related issue

<!--
Please link related issues: Fixes #<issue_number>
More info: https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

## Tests

<!--
Please refer to the CONTRIBUTING.md file to know more about the testing process. Ensure you've tested at least the package you're modifying if running all the tests consumes too much memory on your system.
-->

- [ ] Yes
- [x] No, because they aren't needed
- [ ] No, because I need help

## Added to documentation?

<!--
If the changes are small, code comments are enough, otherwise, the documentation is needed. It
may be a README.md file added to your module/package, a DojoBook PR or both.
-->

- [ ] README.md
- [ ] [Dojo Book](https://github.com/dojoengine/book)
- [x] No documentation needed

## Checklist

- [x] I've formatted my code (`scripts/prettier.sh`, `scripts/rust_fmt.sh`, `scripts/cairo_fmt.sh`)
- [ ] I've linted my code (`scripts/clippy.sh`, `scripts/docs.sh`)
- [x] I've commented my code
- [ ] I've requested a review after addressing the comments
  • Loading branch information
kariy authored May 23, 2024
1 parent 5fe059b commit cae245a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/katana/primitives/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,25 @@ impl DeclareTx {
}
}

/// The transaction type for L1 handler invocation.
#[derive(Debug, Clone, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct L1HandlerTx {
/// The L1 to L2 message nonce.
pub nonce: Nonce,
/// The chain id.
pub chain_id: ChainId,
/// Amount of fee paid on L1.
pub paid_fee_on_l1: u128,
/// Transaction version.
pub version: FieldElement,
/// L1 to L2 message hash.
pub message_hash: B256,
/// The input to the L1 handler function.
pub calldata: Vec<FieldElement>,
/// Contract address of the L1 handler.
pub contract_address: ContractAddress,
/// The L1 handler function selector.
pub entry_point_selector: FieldElement,
}

Expand Down

0 comments on commit cae245a

Please sign in to comment.