Class ConstantManager<TValue, TKey, TArray>

Manages a constant value in storage.

Type Parameters

  • TValue

    The type of the value stored.

  • TKey = u8

    The type of the key used to store the value.

  • TArray = void

    When value is an array of serializable, the underlying serializable type.

Hierarchy

  • ConstantManager

Constructors

Properties

Methods

Constructors

Properties

key: StaticArray<number>

Methods

  • Retrieves the value from storage and panics in case of failure.

    Returns

    the value stored.

    Throws

    if the key is not found in storage.

    Throws

    if the value is not found in storage.

    Returns TValue

  • Sets the value in storage.

    Parameters

    • value: TValue

      The value to store. Must be an A

    Returns void

  • Retrieves the value from storage and returns a result.

    Returns

    the value stored wrapped in a result.

    Returns Result<TValue>

Generated using TypeDoc