IContinuousIndexing

Git Source

Author: M^0 Labs

Functions

updateIndex

Updates the latest index and latest accrual time in storage.

function updateIndex() external returns (uint128);

Returns

NameTypeDescription

<none>

uint128

index The new stored index for computing present amounts from principal amounts.

currentIndex

The current index that would be written to storage if updateIndex is called.

function currentIndex() external view returns (uint128);

latestIndex

The latest updated index.

function latestIndex() external view returns (uint128);

latestUpdateTimestamp

The latest timestamp when the index was updated.

function latestUpdateTimestamp() external view returns (uint40);

Events

IndexUpdated

Emitted when the index is updated.

event IndexUpdated(uint128 indexed index, uint32 indexed rate);

Parameters

NameTypeDescription

index

uint128

The new index.

rate

uint32

The current rate.

Copyright 2024 M^0 Foundation