Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Continuous index across disabling/enabling of earning #106

Open
wants to merge 1 commit into
base: feat/no-claim-on-transfer-2
Choose a base branch
from

Conversation

deluca-mike
Copy link
Collaborator

No description provided.

@deluca-mike deluca-mike added the enhancement New feature or request label Jan 23, 2025
@deluca-mike deluca-mike self-assigned this Jan 23, 2025
Copy link

github-actions bot commented Jan 23, 2025

LCOV of commit fcdd8b7 during Forge Coverage #544

Summary coverage rate:
  lines......: 98.4% (248 of 252 lines)
  functions..: 98.2% (56 of 57 functions)
  branches...: 88.0% (22 of 25 branches)

Files changed coverage rate:
                       |Lines       |Functions  |Branches    
  Filename             |Rate     Num|Rate    Num|Rate     Num
  ===========================================================
  src/MigratorV1.sol   |20.0%     25|80.0%     5|    -      0
  src/WrappedMToken.sol|23.3%    223|41.2%    51|    -      0

}

/// @inheritdoc IWrappedMToken
function startEarningFor(address account_) external {
if (!isEarningEnabled()) revert EarningIsDisabled();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we still revert if earning is currently disabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. There is no harm to allowing starting earning when earning is disabled since when the index is continuous it will be fixed at whatever it is until earning is enabled again, and after that it will grow from that point when enabled.

@deluca-mike deluca-mike force-pushed the feat/no-claim-on-transfer-2 branch from ef65c39 to 482df44 Compare January 28, 2025 20:05
@deluca-mike deluca-mike force-pushed the feat/continuous-index-2 branch from c64dd91 to fcdd8b7 Compare January 28, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants