-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove most info from relayed L1->GW priority ops (#775)
- Loading branch information
1 parent
73ddd6d
commit dccc114
Showing
8 changed files
with
64 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,17 @@ pragma solidity 0.8.24; | |
|
||
import {ZkSyncHyperchainStorage} from "../ZkSyncHyperchainStorage.sol"; | ||
import {ReentrancyGuard} from "../../../common/ReentrancyGuard.sol"; | ||
|
||
import {PriorityQueue} from "../../libraries/PriorityQueue.sol"; | ||
import {PriorityTree} from "../../libraries/PriorityTree.sol"; | ||
import {Unauthorized} from "../../../common/L1ContractErrors.sol"; | ||
|
||
/// @title Base contract containing functions accessible to the other facets. | ||
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
contract ZkSyncHyperchainBase is ReentrancyGuard { | ||
using PriorityQueue for PriorityQueue.Queue; | ||
using PriorityTree for PriorityTree.Tree; | ||
|
||
// slither-disable-next-line uninitialized-state | ||
ZkSyncHyperchainStorage internal s; | ||
|
||
|
@@ -64,4 +68,12 @@ contract ZkSyncHyperchainBase is ReentrancyGuard { | |
} | ||
_; | ||
} | ||
|
||
function _getTotalPriorityTxs() internal view returns (uint256) { | ||
if (s.priorityQueue.getFirstUnprocessedPriorityTx() >= s.priorityTree.startIndex) { | ||
return s.priorityTree.getTotalPriorityTxs(); | ||
} else { | ||
return s.priorityQueue.getTotalPriorityTxs(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.