Skip to content

Commit 3c9bc50

Browse files
authored
Merge pull request #218 from lidofinance/feature/oracle-daemon-config-docs
Update oracle daemon config docs
2 parents 6f441ec + 195eaf2 commit 3c9bc50

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

docs/contracts/oracle-daemon-config.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,102 @@ The full list of params are provided in the Lido V2 mainnet parameters [guide](/
99
:::note
1010
In contrast to [`OracleReportSanityChecker`](/contracts/oracle-report-sanity-checker), the stored values aren't enforced by the protocol on-chain code.
1111
:::
12+
13+
## View methods
14+
15+
### get(string calldata _key)
16+
17+
Retrieves the value corresponding to the provided key.
18+
19+
```solidity
20+
function get(string calldata _key) external view returns (bytes memory)
21+
```
22+
23+
:::note
24+
Reverts if value is missing.
25+
:::
26+
27+
### getList(string[] calldata _keys)
28+
29+
Retrieves a list of values corresponding to the provided keys.
30+
31+
```solidity
32+
function getList(string[] calldata _keys) external view returns (bytes[] memory)
33+
```
34+
35+
:::note
36+
Reverts if any value for a specific key is missing.
37+
:::
38+
39+
## Methods
40+
41+
### set(string calldata _key, bytes calldata _value)
42+
43+
Sets the value for the provided key. Can only be called by users with `CONFIG_MANAGER_ROLE`.
44+
45+
```solidity
46+
function set(string calldata _key, bytes calldata _value) external
47+
```
48+
49+
:::note
50+
Reverts if any of the following is true:
51+
- value with provided key already exists
52+
- value is empty
53+
- called by someone who doesn't have `CONFIG_MANAGER_ROLE` role
54+
:::
55+
56+
### update(string calldata _key, bytes calldata _value)
57+
58+
Updates the value for the provided key. Can only be called by users with `CONFIG_MANAGER_ROLE`.
59+
60+
```solidity
61+
function update(string calldata _key, bytes calldata _value) external
62+
```
63+
64+
:::note
65+
Reverts if any of the following is true:
66+
- value with provided key doesn't exist
67+
- value is the same with the one already set
68+
- value is empty
69+
- called by someone who doesn't have `CONFIG_MANAGER_ROLE` role
70+
:::
71+
72+
### unset(string calldata _key)
73+
74+
Removes the value of the provided key. Can only be called by users with `CONFIG_MANAGER_ROLE`.
75+
76+
```solidity
77+
function unset(string calldata _key) external
78+
```
79+
80+
:::note
81+
Reverts if any of the following is true:
82+
- value with provided key doesn't exist
83+
- called by someone who doesn't have `CONFIG_MANAGER_ROLE` role
84+
:::
85+
86+
## Events
87+
88+
### ConfigValueSet
89+
90+
Emitted when a new key-value pair is set.
91+
92+
```solidity
93+
event ConfigValueSet(string indexed key, bytes value)
94+
```
95+
96+
### ConfigValueUpdated
97+
98+
Emitted when a key-value pair is updated.
99+
100+
```solidity
101+
event ConfigValueUpdated(string indexed key, bytes value)
102+
```
103+
104+
### ConfigValueUnset
105+
106+
Emitted when a key-value pair is unset.
107+
108+
```solidity
109+
event ConfigValueUnset(string indexed key)
110+
```

0 commit comments

Comments
 (0)