forked from neptune-mutual-blue/protocol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMockStore.sol
41 lines (36 loc) · 939 Bytes
/
MockStore.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
// Neptune Mutual Protocol (https://neptunemutual.com)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../../fakes/FakeStore.sol";
contract MockStore is FakeStore {
function setBool(bytes32 prefix, address a) external {
bytes32 k = keccak256(abi.encodePacked(prefix, a));
this.setBool(k, true);
}
function unsetBool(bytes32 prefix, address a) external {
bytes32 k = keccak256(abi.encodePacked(prefix, a));
this.deleteBool(k);
}
function setAddress(
bytes32 k1,
bytes32 k2,
address v
) public {
this.setAddress(keccak256(abi.encodePacked(k1, k2)), v);
}
function setAddress(
bytes32 k1,
bytes32 k2,
bytes32 k3,
address v
) external {
this.setAddress(keccak256(abi.encodePacked(k1, k2, k3)), v);
}
function setUint(
bytes32 k1,
bytes32 k2,
uint256 v
) external {
this.setUint(keccak256(abi.encodePacked(k1, k2)), v);
}
}