Skip to content

Commit

Permalink
fix: transaction filterer setter link (#268)
Browse files Browse the repository at this point in the history
Fixes the `TransactionFilterer` setter link
  • Loading branch information
giovannidisiena authored Nov 26, 2024
1 parent 72a51cf commit c098ae6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The ZK Chain operators can filter both the transactions initiated from L1 and th
To filter L1→L2 transactions coming through the Diamond proxy, operators shall:

1. Implement & deploy the `TransactionFilterer` contract which implement the
[`ITransactionFilterer`](https://github.com/matter-labs/era-contracts/blob/dev/l1-contracts/contracts/state-transition/chain-interfaces/ITransactionFilterer.sol#L8)
[`ITransactionFilterer`](https://github.com/matter-labs/era-contracts/blob/d1d4391b7d4685346d005df75935769a42ea60bc/l1-contracts/contracts/state-transition/chain-interfaces/ITransactionFilterer.sol#L8)
2. Have the `TransactionFilterer` address set in the state transition
[storage](https://github.com/matter-labs/era-contracts/blob/dev/l1-contracts/contracts/state-transition/chain-deps/ZkSyncHyperchainStorage.sol)
(by using [this function](https://github.com/matter-labs/era-contracts/blob/dev/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol#L95)).
[storage](https://github.com/matter-labs/era-contracts/blob/d1d4391b7d4685346d005df75935769a42ea60bc/l1-contracts/contracts/state-transition/chain-deps/ZkSyncHyperchainStorage.sol)
(by using [this function](https://github.com/matter-labs/era-contracts/blob/d1d4391b7d4685346d005df75935769a42ea60bc/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol#L116)).

If the filterer exists, it will be called by the
[Mailbox facet](https://github.com/matter-labs/era-contracts/blob/994897b14eb1d8e77c809da2db3379e7b58125b5/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol#L239)
[Mailbox facet](https://github.com/matter-labs/era-contracts/blob/d1d4391b7d4685346d005df75935769a42ea60bc/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol#L257-L264)
with the tx details, and will return whether the transaction can be executed.
To disable L1→L2 filtering, the same function that registers the filtered to the storage can be used with `0x0` address.

Expand Down

0 comments on commit c098ae6

Please sign in to comment.