KeyValueStore
State Variables
caliber
Owner of the contract.
address public immutable caliber;
_store
Internal key-value storage mapping.
mapping(bytes32 key => bytes32 value) private _store;
Functions
onlyCaliber
modifier onlyCaliber();
constructor
constructor(address _caliber);
set
Stores a value associated with a specific key.
function set(bytes32 key, bytes32 value) external onlyCaliber;
Parameters
| Name | Type | Description |
|---|---|---|
key | bytes32 | The key to associate with the value. |
value | bytes32 | The value to be stored for the given key. |
get
Returns the value associated with a specific key.
function get(bytes32 key) external view returns (bytes32);
Parameters
| Name | Type | Description |
|---|---|---|
key | bytes32 | The key whose value to retrieve. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | value The value associated with the provided key. |
reset
Deletes the value associated with a specific key.
function reset(bytes32 key) external onlyCaliber;
Parameters
| Name | Type | Description |
|---|---|---|
key | bytes32 | The key whose value to delete. |
Errors
NotOwner
error NotOwner();