-
Notifications
You must be signed in to change notification settings - Fork 0
/
AutomataPckDao.sol
42 lines (35 loc) · 1.48 KB
/
AutomataPckDao.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
40
41
42
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {PckDao, PcsDao, X509CRLHelper, DaoBase} from "../bases/PckDao.sol";
import {AutomataDaoStorage} from "./shared/AutomataDaoStorage.sol";
import {AutomataDaoBase} from "./shared/AutomataDaoBase.sol";
contract AutomataPckDao is AutomataDaoBase, PckDao {
constructor(address _storage, address _p256, address _pcs, address _x509, address _crl)
PckDao(_storage, _p256, _pcs, _x509, _crl)
{}
function _onFetchDataFromResolver(bytes32 key, bool hash)
internal
view
override(AutomataDaoBase, DaoBase)
returns (bytes memory data)
{
data = super._onFetchDataFromResolver(key, hash);
}
function _upsertTcbm(bytes16 qeid, bytes2 pceid, bytes18 tcbm) internal override {
AutomataDaoStorage(address(resolver)).setTcbm(qeid, pceid, tcbm);
}
function _getAllTcbs(bytes16 qeidBytes, bytes2 pceidBytes)
internal
view
override
returns (bytes18[] memory tcbms)
{
tcbms = AutomataDaoStorage(address(resolver)).printTcbmSet(qeidBytes, pceidBytes);
}
function _setTcbrToTcbmMapping(bytes32 tcbMappingKey, bytes18 tcbmBytes) internal override {
AutomataDaoStorage(address(resolver)).setTcbrMapping(tcbMappingKey, tcbmBytes);
}
function _tcbrToTcbmMapping(bytes32 tcbMappingKey) internal view override returns (bytes18 tcbm) {
tcbm = AutomataDaoStorage(address(resolver)).getTcbm(tcbMappingKey);
}
}