Skip to content

Commit

Permalink
fix: Natspec corrections (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
deluca-mike authored Dec 5, 2024
1 parent 7c8f77b commit f312406
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 60 deletions.
9 changes: 5 additions & 4 deletions src/SmartMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ contract SmartMToken is ISmartMToken, Migratable, ERC20Extended {

/**
* @dev Struct to represent an account's balance and yield earning details
* @param isEarning Whether the account is actively earning yield.
* @param balance The present amount of tokens held by the account.
* @param lastIndex The index of the last interaction for the account (0 for non-earning accounts).
* @param hasEarnerDetails Whether the account has additional details for earning yield.
* @param isEarning Whether the account is actively earning yield.
* @param balance The present amount of tokens held by the account.
* @param lastIndex The index of the last interaction for the account (0 for non-earning accounts).
* @param hasEarnerDetails Whether the account has additional details for earning yield.
* @param hasClaimRecipient Whether the account has an explicitly set claim recipient.
*/
struct Account {
// First Slot
Expand Down
4 changes: 4 additions & 0 deletions src/interfaces/IEarnerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ interface IEarnerManager is IMigratable {

/**
* @notice Sets the status for `account` to `status`.
* @notice If approving an earner that is already earning, but was recently removed from the Registrar earners list,
* call `smartM.stopEarning(account)` before calling this, then call `smartM.startEarning(account)`.
* @param account The account under which yield could generate.
* @param status Whether the account is an earner, according to the admin.
* @param feeRate The fee rate to be taken from the yield.
Expand All @@ -70,6 +72,8 @@ interface IEarnerManager is IMigratable {

/**
* @notice Sets the status for multiple accounts.
* @notice If approving an earner that is already earning, but was recently removed from the Registrar earners list,
* call `smartM.stopEarning(account)` before calling this, then call `smartM.startEarning(account)`.
* @param accounts The accounts under which yield could generate.
* @param statuses Whether each account is an earner, respectively, according to the admin.
* @param feeRates The fee rates to be taken from the yield, respectively.
Expand Down
12 changes: 6 additions & 6 deletions src/interfaces/ISmartMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface ISmartMToken is IMigratable, IERC20Extended {
error EarningCannotBeReenabled();

/**
* @notice Emitted when calling `stopEarning` for an account approved as earner by the Registrar.
* @notice Emitted when calling `mToken.stopEarning` for an account approved as an earner.
* @param account The account that is an approved earner.
*/
error IsApprovedEarner(address account);
Expand All @@ -83,7 +83,7 @@ interface ISmartMToken is IMigratable, IERC20Extended {
error InsufficientBalance(address account, uint240 balance, uint240 amount);

/**
* @notice Emitted when calling `startEarning` for an account not approved as earner by the Registrar.
* @notice Emitted when calling `mToken.startEarning` for an account not approved as an.
* @param account The account that is not an approved earner.
*/
error NotApprovedEarner(address account);
Expand Down Expand Up @@ -195,25 +195,25 @@ interface ISmartMToken is IMigratable, IERC20Extended {
function disableEarning() external;

/**
* @notice Starts earning for `account` if allowed by the Registrar.
* @notice Starts earning for `account` if allowed by the Earner Manager.
* @param account The account to start earning for.
*/
function startEarningFor(address account) external;

/**
* @notice Starts earning for multiple accounts if individually allowed by the Registrar.
* @notice Starts earning for multiple accounts if individually allowed by the Earner Manager.
* @param accounts The accounts to start earning for.
*/
function startEarningFor(address[] calldata accounts) external;

/**
* @notice Stops earning for `account` if disallowed by the Registrar.
* @notice Stops earning for `account` if disallowed by the Earner Manager.
* @param account The account to stop earning for.
*/
function stopEarningFor(address account) external;

/**
* @notice Stops earning for multiple accounts if individually disallowed by the Registrar.
* @notice Stops earning for multiple accounts if individually disallowed by the Earner Manager.
* @param accounts The account to stop earning for.
*/
function stopEarningFor(address[] calldata accounts) external;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/EarnerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IEarnerManager } from "../../src/interfaces/IEarnerManager.sol";
import { MockRegistrar } from "./../utils/Mocks.sol";
import { EarnerManagerHarness } from "../utils/EarnerManagerHarness.sol";

contract EarnerStatusManagerTests is Test {
contract EarnerManagerTests is Test {
bytes32 internal constant _EARNERS_LIST_IGNORED_KEY = "earners_list_ignored";
bytes32 internal constant _EARNERS_LIST_NAME = "earners";
bytes32 internal constant _ADMINS_LIST_NAME = "em_admins";
Expand Down
Loading

0 comments on commit f312406

Please sign in to comment.