Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

natspec(TwabLib): fix cardinality docs on AccountDetails #160

Merged
merged 2 commits into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 The upper limit on the number of twabs.
/** @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