-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSequencer.sol
39 lines (32 loc) · 1002 Bytes
/
Sequencer.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.20;
import "../common/intf/ISequencer.sol";
contract Sequencer is ISequencer {
mapping(uint64 eon => uint64 txCount) private txCounters;
function submitEncryptedTransaction(
uint64 eon,
bytes32 identityPrefix,
bytes memory encryptedTransaction,
uint256 gasLimit
) external payable {
if (msg.value < block.basefee * gasLimit) {
revert InsufficientFee();
}
uint64 index = txCounters[eon];
txCounters[eon] = index + 1;
emit TransactionSubmitted(
eon,
index,
identityPrefix,
msg.sender,
encryptedTransaction,
gasLimit
);
}
function submitDecryptionProgress(bytes memory message) external {
emit DecryptionProgressSubmitted(message);
}
function getTxCountForEon(uint64 eon) external view returns (uint64) {
return txCounters[eon];
}
}