Skip to content

Commit 71e5a82

Browse files
committed
prevent button press/mints before epoch 0
1 parent 403dd40 commit 71e5a82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/contracts/core/EmissionsController.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ contract EmissionsController is
8080
uint256 totalDistributions = getTotalDistributions();
8181
uint256 nextDistributionId = _epochs[currentEpoch].totalProcessed;
8282

83+
// Check if emissions have not started yet.
84+
// Prevents minting EIGEN before the first epoch has started.
85+
if (currentEpoch == type(uint256).max) {
86+
revert EmissionsNotStarted();
87+
}
88+
8389
// Check if all distributions have already been processed.
8490
if (nextDistributionId >= totalDistributions) {
8591
revert AllDistributionsProcessed();

0 commit comments

Comments
 (0)