Skip to main content

CheckpointsUpgradeable

This library defines the History struct, for checkpointing values as they change at different points in time, and later looking up past values by block number. See {Votes} as an example. To create a history of checkpoints define a variable type Checkpoints.History in your contract, and store a new checkpoint for the current transaction block using the {push} function. Available since v4.5.