Make ERC20Votes independent from ERC20Permit (#3816)
Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
@ -107,6 +107,13 @@ function getAtProbablyRecentBlock(${opts.historyTypeName} storage self, uint256
|
||||
return pos == 0 ? 0 : _unsafeAccess(self.${opts.checkpointFieldName}, pos - 1).${opts.valueFieldName};
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns checkpoint at given position.
|
||||
*/
|
||||
function getAtPosition(History storage self, uint32 pos) internal view returns (Checkpoint memory) {
|
||||
return self._checkpoints[pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user