Skip to main content

KeyValueStore

Git Source

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

NameTypeDescription
keybytes32The key to associate with the value.
valuebytes32The 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

NameTypeDescription
keybytes32The key whose value to retrieve.

Returns

NameTypeDescription
<none>bytes32value The value associated with the provided key.

reset

Deletes the value associated with a specific key.

function reset(bytes32 key) external onlyCaliber;

Parameters

NameTypeDescription
keybytes32The key whose value to delete.

Errors

NotOwner

error NotOwner();