Skip to content

Commit

Permalink
feat(l1): parse l2 to l1 message (#352)
Browse files Browse the repository at this point in the history
# What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `cargo fmt`.

---------

Signed-off-by: Danil <deniallugo@gmail.com>
  • Loading branch information
Deniallugo committed Jan 17, 2024
1 parent 0fbddd4 commit c5eb7e5
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 685 deletions.
4 changes: 2 additions & 2 deletions chain-events/src/block_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use futures::{Sink, SinkExt, StreamExt};
use client::{
zksync_contract::{
codegen::{
BlockCommitFilter, BlockExecutionFilter, BlocksVerificationFilter, CommitBlocksCall,
BlockCommitFilter, BlockExecutionFilter, BlocksVerificationFilter, CommitBatchesCall,
},
parse_withdrawal_events_l1,
},
Expand Down Expand Up @@ -282,7 +282,7 @@ where

let mut events = vec![];

if let Ok(commit_blocks) = CommitBlocksCall::decode(&tx.input) {
if let Ok(commit_blocks) = CommitBatchesCall::decode(&tx.input) {
let mut res = parse_withdrawal_events_l1(
&commit_blocks,
tx.block_number
Expand Down
Loading

0 comments on commit c5eb7e5

Please sign in to comment.