Skip to content

Commit a1162f2

Browse files
committed
style: satisfy linter
1 parent 01d208f commit a1162f2

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

src/XanV1.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ contract XanV1 is
7979
_;
8080
}
8181

82+
/// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.
8283
/// @custom:oz-upgrades-unsafe-allow constructor
8384
constructor() {
8485
_disableInitializers();
8586
}
8687

88+
// solhint-disable comprehensive-interface
8789
/// @notice Initializes the XanV1 contract.
8890
/// @param initialMintRecipient The initial recipient of the minted tokens.
8991
/// @param council The address of the governance council contract.
90-
// solhint-disable-next-line comprehensive-interface
9192
function initializeV1(address initialMintRecipient, address council) external initializer {
9293
// Initialize inherited contracts
9394
__ERC20_init({name_: Parameters.NAME, symbol_: Parameters.SYMBOL});
@@ -98,7 +99,7 @@ contract XanV1 is
9899
// Initialize the XanV1 contract
99100
_mint(initialMintRecipient, Parameters.SUPPLY);
100101
_getCouncilData().council = council;
101-
}
102+
} // solhint-enable comprehensive-interface
102103

103104
/// @inheritdoc IXanV1
104105
function lock(uint256 value) external override {
@@ -518,7 +519,7 @@ contract XanV1 is
518519
}
519520

520521
/// @notice Returns the storage from the Xan V1 storage location.
521-
/// @return xanV1Storage The data associated with Xan token storage.
522+
/// @return xanV1Storage The data associated with the Xan V1 token storage.
522523
function _getXanV1Storage() internal pure returns (XanV1Storage storage xanV1Storage) {
523524
// solhint-disable no-inline-assembly
524525
{

src/drafts/XanV2.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ contract XanV2 is IXanV2, XanV1 {
2828
_;
2929
}
3030

31+
// solhint-disable comprehensive-interface
3132
/// @notice Initializes the XanV2 contract.
3233
/// @param initialMintRecipient The initial recipient of the minted tokens.
3334
/// @param council The address of the governance council contract.
3435
/// @param xanV2Forwarder The XanV2 forwarder contract.
3536
/// @custom:oz-upgrades-validate-as-initializer
36-
// solhint-disable-next-line comprehensive-interface
3737
function initializeV2(address initialMintRecipient, address council, address xanV2Forwarder)
3838
external
3939
reinitializer(2)
@@ -50,17 +50,17 @@ contract XanV2 is IXanV2, XanV1 {
5050

5151
// Initialize the XanV2 contract
5252
_getXanV2Storage().forwarder = xanV2Forwarder;
53-
}
53+
} // solhint-enable comprehensive-interface
5454

55+
// solhint-disable comprehensive-interface
5556
/// @notice Reinitializes the XanV2 contract after an upgrade from XanV1.
5657
/// @param xanV2Forwarder The XanV2 forwarder contract.
5758
/// @custom:oz-upgrades-unsafe-allow missing-initializer-call
5859
/// @custom:oz-upgrades-validate-as-initializer
59-
// solhint-disable-next-line comprehensive-interface
6060
function reinitializeFromV1(address xanV2Forwarder) external reinitializer(2) {
6161
// Initialize the XanV2 contract
6262
_getXanV2Storage().forwarder = xanV2Forwarder;
63-
}
63+
} // solhint-enable comprehensive-interface
6464

6565
/// @inheritdoc IXanV2
6666
function mint(address account, uint256 value) external override onlyForwarder {
@@ -80,13 +80,13 @@ contract XanV2 is IXanV2, XanV1 {
8080
}
8181

8282
/// @notice Returns the storage from the Xan V2 storage location.
83-
/// @return $ The data associated with Xan token storage.
84-
function _getXanV2Storage() internal pure returns (XanV2Storage storage $) {
83+
/// @return xanV2Storage The data associated with the Xan V2 token storage.
84+
function _getXanV2Storage() internal pure returns (XanV2Storage storage xanV2Storage) {
8585
// solhint-disable no-inline-assembly
8686
{
8787
// slither-disable-next-line assembly
8888
assembly {
89-
$.slot := _XAN_V2_STORAGE_LOCATION
89+
xanV2Storage.slot := _XAN_V2_STORAGE_LOCATION
9090
}
9191
}
9292
// solhint-enable no-inline-assembly

src/drafts/XanV2Forwarder.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ contract XanV2Forwarder is ForwarderBase {
1313
error InvalidFunctionSelector(bytes4 expected, bytes4 actual);
1414
error InvalidMintRecipient(address recipient);
1515

16+
/// @notice Constructs a forwarder.
17+
/// @param xanProxy The of the XAN proxy contract.
18+
/// @param protocolAdapter The address of the protocol adapter.
19+
/// @param calldataCarrierLogicRef The logic reference of the associated calldata carrier resource.
1620
constructor(address xanProxy, address protocolAdapter, bytes32 calldataCarrierLogicRef)
1721
ForwarderBase(protocolAdapter, calldataCarrierLogicRef)
1822
{

src/interfaces/IXanV1.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ interface IXanV1 {
9696

9797
/// @notice Returns the unlocked token balance of an account.
9898
/// @param from The account to query.
99-
/// @param unlockedBalance The unlocked balance.
99+
/// @return unlockedBalance The unlocked balance.
100100
function unlockedBalanceOf(address from) external view returns (uint256 unlockedBalance);
101101

102102
/// @notice Returns the locked token balance of an account.
103103
/// @param from The account to query.
104-
/// @param lockedBalance The locked balance.
104+
/// @return lockedBalance The locked balance.
105105
function lockedBalanceOf(address from) external view returns (uint256 lockedBalance);
106106

107107
/// @notice Returns the locked total supply of the token.
108-
/// @param locked The locked supply.
108+
/// @return locked The locked supply.
109109
function lockedSupply() external view returns (uint256 locked);
110110

111111
/// @notice Returns the upgrade scheduled by the voter body or `ScheduledUpgrade(0)`

src/libs/Voting.sol

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ library Voting {
3131
}
3232

3333
/// @notice Assigns the highest rank to a proposed implementation.
34-
/// @param data The voting data containing the proposed upgrades.
34+
/// @param data The voting data containing the ballots and ranking of proposed implementations.
3535
/// @param proposedImpl The proposed implementation to assign the highest rank to.
3636
function assignWorstRank(Data storage data, address proposedImpl) internal {
3737
Ballot storage ballot = data.ballots[proposedImpl];
@@ -44,7 +44,7 @@ library Voting {
4444
}
4545

4646
/// @notice Bubble the proposed implementation up in the ranking.
47-
/// @param data The voting data containing the ballots for proposed upgrades.
47+
/// @param data The voting data containing the ballots and ranking of proposed upgrades.
4848
/// @param proposedImpl The proposed implementation.
4949
function bubbleUp(Data storage data, address proposedImpl) internal {
5050
Ballot storage ballot = data.ballots[proposedImpl];
@@ -71,7 +71,7 @@ library Voting {
7171
}
7272

7373
/// @notice Bubble the proposed implementation down in the ranking.
74-
/// @param data The voting data containing the ballots for proposed upgrades.
74+
/// @param data The voting data containing the ballots and ranking of proposed upgrades.
7575
/// @param proposedImpl The proposed implementation.
7676
function bubbleDown(Data storage data, address proposedImpl) internal {
7777
Ballot storage ballot = data.ballots[proposedImpl];
@@ -99,6 +99,7 @@ library Voting {
9999
}
100100

101101
/// @notice Returns the implementation with the respective rank or `address(0)` if the rank does not exist.
102+
/// @param data The storage containing the implementation ranking and count.
102103
/// @param rank The rank to return the implementation for.
103104
/// @return impl The proposed implementation with the respective rank or `address(0)` if the rank does not exist.
104105
function implementationByRank(Data storage data, uint48 rank) internal view returns (address impl) {
@@ -112,13 +113,14 @@ library Voting {
112113
}
113114

114115
/// @notice Returns the number of implementations.
116+
/// @param data The storage containing the number of implementations being ranked.
115117
/// @return count implementation count.
116118
function implementationsCount(Data storage data) internal view returns (uint48 count) {
117119
count = data.implCount;
118120
}
119121

120122
/// @notice Swaps the rank of two implementations A and B.
121-
/// @param data The storage containing the ballots for proposed upgrades.
123+
/// @param data The storage containing the implementation ranking.
122124
/// @param implA Implementation A.
123125
/// @param rankA The rank of implementation A before the swap.
124126
/// @param implB Implementation B.

0 commit comments

Comments
 (0)