Skip to content

Commit

Permalink
refactor: remove numNewOwners tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
kupermind committed Jul 24, 2024
1 parent dc18a3d commit bb35f9a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions contracts/Tokenomics.sol
Original file line number Diff line number Diff line change
Expand Up @@ -950,13 +950,6 @@ contract Tokenomics is TokenomicsConstants {
if (!mapNewUnits[unitType][serviceUnitIds[j]]) {
mapNewUnits[unitType][serviceUnitIds[j]] = true;
mapEpochTokenomics[curEpoch].unitPoints[unitType].numNewUnits++;
// Check if the owner has introduced component / agent for the first time
// This is done together with the new unit check, otherwise it could be just a new unit owner
address unitOwner = IToken(registries[unitType]).ownerOf(serviceUnitIds[j]);
if (!mapNewOwners[unitOwner]) {
mapNewOwners[unitOwner] = true;
mapEpochTokenomics[curEpoch].epochPoint.numNewOwners++;
}
}
}
}
Expand All @@ -974,7 +967,6 @@ contract Tokenomics is TokenomicsConstants {
/// ==> mapEpochTokenomics[epochCounter].epochPoint.totalDonationsETH == old(mapEpochTokenomics[epochCounter].epochPoint.totalDonationsETH) + donationETH;
/// #if_succeeds {:msg "sumUnitTopUpsOLAS for components can only increase"} mapEpochTokenomics[epochCounter].unitPoints[0].sumUnitTopUpsOLAS >= old(mapEpochTokenomics[epochCounter].unitPoints[0].sumUnitTopUpsOLAS);
/// #if_succeeds {:msg "sumUnitTopUpsOLAS for agents can only increase"} mapEpochTokenomics[epochCounter].unitPoints[1].sumUnitTopUpsOLAS >= old(mapEpochTokenomics[epochCounter].unitPoints[1].sumUnitTopUpsOLAS);
/// #if_succeeds {:msg "numNewOwners can only increase"} mapEpochTokenomics[epochCounter].epochPoint.numNewOwners >= old(mapEpochTokenomics[epochCounter].epochPoint.numNewOwners);
function trackServiceDonations(
address donator,
uint256[] memory serviceIds,
Expand Down

0 comments on commit bb35f9a

Please sign in to comment.