Skip to content

Commit

Permalink
natspec(TwabLib): update docs on AccountDetails struct
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Oct 5, 2021
1 parent 02a947e commit 2319f7d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions contracts/libraries/TwabLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ library TwabLib {
/// @notice The maximum number of twab entries
uint24 public constant MAX_CARDINALITY = 16777215; // 2**24

/// @notice A struct containing details for an Account
/// @param balance The current balance for an Account
/// @param nextTwabIndex The next available index to store a new twab
/// @param cardinality Current total of "initialized" ring buffer checkpoints. Used to set initial boundary conditions in binary search.
/** @notice Struct ring buffer parameters for single user Account
* @param balance Current balance for an Account
* @param nextTwabIndex Next uninitialized or updatable ring buffer checkpoint storage slot
* @param cardinality Current total "initialized" ring buffer checkpoints for single user AccountDetails.
Used to set initial boundary conditions for an efficient binary search.
*/
struct AccountDetails {
uint208 balance;
uint24 nextTwabIndex;
Expand Down

0 comments on commit 2319f7d

Please sign in to comment.