-
Notifications
You must be signed in to change notification settings - Fork 29
/
PriorityQueueTest.sol
39 lines (28 loc) · 1.06 KB
/
PriorityQueueTest.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "../../zksync/libraries/PriorityQueue.sol";
contract PriorityQueueTest {
using PriorityQueue for PriorityQueue.Queue;
PriorityQueue.Queue priorityQueue;
function getFirstUnprocessedPriorityTx() external view returns (uint256) {
return priorityQueue.getFirstUnprocessedPriorityTx();
}
function getTotalPriorityTxs() external view returns (uint256) {
return priorityQueue.getTotalPriorityTxs();
}
function getSize() external view returns (uint256) {
return priorityQueue.getSize();
}
function isEmpty() external view returns (bool) {
return priorityQueue.isEmpty();
}
function pushBack(PriorityOperation memory _operation) external {
return priorityQueue.pushBack(_operation);
}
function front() external view returns (PriorityOperation memory) {
return priorityQueue.front();
}
function popFront() external returns (PriorityOperation memory operation) {
return priorityQueue.popFront();
}
}