-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
[in the dev-3.0.0 branch]
Currently we call _adjustTotalSupplyCheckpoints every time there is an operation that mints or burns tokens. However, in practice this will always be a no-op due to:
if ((_checkpoints.length > 0) && (_checkpoints[_checkpoints.length - 1].checkpointId == _currentCheckpointId)) {
return;
}
in TokenLib.sol, unless a new checkpoint has been created since the last mint / burn operation.
It would be more efficient (in terms of gas consumption) to do this inside of the createCheckpoint instead.
Following the change all of the tests should still run to success, specifically c_checkpoints.js.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers