Skip to content

Commit b6031ad

Browse files
chore: comment ipmrovements (#21)
* chore: fix dots at end of natspec comments * chore: fix construtors and initializers natspec comments * chore: update reserved gap comment to make everything consistant * chore: make prettier one-liner preventer shorter * feat: comments minor changes --------- Co-authored-by: Igor Senych <[email protected]>
1 parent 1aa7eae commit b6031ad

13 files changed

+43
-43
lines changed

.cursor/rules/solidity-example-project.mdc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ abstract contract BlueprintStorageLayout is IBlueprintTypes {
352352
/**
353353
* @dev Defines the contract storage structure.
354354
*
355-
* The fields:
355+
* Fields:
356356
*
357357
* - token ---------------- The address of the underlying token.
358358
* - operationalTreasury -- The address of the operational treasury.
@@ -367,11 +367,11 @@ abstract contract BlueprintStorageLayout is IBlueprintTypes {
367367
struct BlueprintStorage {
368368
// Slot 1
369369
address token;
370-
// uint96 __reserved1; // Reserved for future use until the end of the storage slot
370+
// uint96 __reserved1; // Reserved until the end of the storage slot
371371

372372
// Slot 2
373373
address operationalTreasury;
374-
// uint96 __reserved2; // Reserved for future use until the end of the storage slot
374+
// uint96 __reserved2; // Reserved until the end of the storage slot
375375

376376
// Slot 3
377377
mapping(bytes32 opId => Operation operation) operations;
@@ -422,7 +422,7 @@ abstract contract AccessControlExtUpgradeable is AccessControlUpgradeable {
422422
// ------------------ Initializers ---------------------------- //
423423

424424
/**
425-
* @dev The unchained internal initializer of the upgradeable contract
425+
* @dev The unchained internal initializer of the upgradeable contract.
426426
*
427427
* See details: https://docs.openzeppelin.com/contracts/5.x/upgradeable#multiple-inheritance
428428
*
@@ -503,7 +503,7 @@ abstract contract PausableExtUpgradeable is AccessControlExtUpgradeable, Pausabl
503503
// ------------------ Initializers ---------------------------- //
504504

505505
/**
506-
* @dev The unchained internal initializer of the upgradeable contract
506+
* @dev The unchained internal initializer of the upgradeable contract.
507507
*
508508
* See details: https://docs.openzeppelin.com/contracts/5.x/upgradeable#multiple-inheritance
509509
*
@@ -565,7 +565,7 @@ abstract contract RescuableUpgradeable is AccessControlExtUpgradeable {
565565
// ------------------ Initializers ---------------------------- //
566566

567567
/**
568-
* @dev The unchained internal initializer of the upgradeable contract
568+
* @dev The unchained internal initializer of the upgradeable contract.
569569
*
570570
* See details: https://docs.openzeppelin.com/contracts/5.x/upgradeable#multiple-inheritance
571571
*
@@ -938,7 +938,7 @@ interface IBlueprintTypes {
938938
/**
939939
* @dev The data of a single operation of the blueprint smart-contract.
940940
*
941-
* The fields:
941+
* Fields:
942942
*
943943
* - status --- The status of the operation according to the {OperationStatus} enum.
944944
* - account -- The address of the account involved in the operation.
@@ -948,13 +948,13 @@ interface IBlueprintTypes {
948948
OperationStatus status;
949949
address account;
950950
uint64 amount;
951-
// uint24 __reserved; // Reserved for future use until the end of the storage slot
951+
// uint24 __reserved; // Reserved until the end of the storage slot
952952
}
953953

954954
/**
955955
* @dev The state of a single account within the blueprint smart-contract.
956956
*
957-
* The fields:
957+
* Fields:
958958
*
959959
* - lastOpId -------- The identifier of the last operation related to the account.
960960
* - balance --------- The balance of the account.
@@ -968,7 +968,7 @@ interface IBlueprintTypes {
968968
// Slot 2
969969
uint64 balance;
970970
uint32 operationCount;
971-
// uint160 __reserved; // Reserved for future use until the end of the storage slot
971+
// uint160 __reserved; // Reserved until the end of the storage slot
972972
}
973973
}
974974
```
@@ -991,7 +991,7 @@ interface IVersionable {
991991
/**
992992
* @dev Defines the version of a contract.
993993
*
994-
* The fields:
994+
* Fields:
995995
*
996996
* - major -- The major version of the contract.
997997
* - minor -- The minor version of the contract.
@@ -1037,7 +1037,7 @@ contract AccessControlExtUpgradeableMock is AccessControlExtUpgradeable, UUPSUpg
10371037
// ------------------ Initializers ---------------------------- //
10381038

10391039
/**
1040-
* @dev The initialize function of the upgradeable contract.
1040+
* @dev Initializer of the upgradeable contract.
10411041
*
10421042
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
10431043
*/
@@ -1090,7 +1090,7 @@ contract PausableExtUpgradeableMock is PausableExtUpgradeable, UUPSUpgradeable {
10901090
// ------------------ Initializers ---------------------------- //
10911091

10921092
/**
1093-
* @dev The initialize function of the upgradeable contract.
1093+
* @dev Initializer of the upgradeable contract.
10941094
*
10951095
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
10961096
*/
@@ -1143,7 +1143,7 @@ contract RescuableUpgradeableMock is RescuableUpgradeable, UUPSUpgradeable {
11431143
// ------------------ Initializers ---------------------------- //
11441144

11451145
/**
1146-
* @dev The initialize function of the upgradeable contract.
1146+
* @dev Initializer of the upgradeable contract.
11471147
*
11481148
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
11491149
*/
@@ -1199,7 +1199,7 @@ contract UUPSExtUpgradeableMock is UUPSExtUpgradeable {
11991199
// ------------------ Initializers ---------------------------- //
12001200

12011201
/**
1202-
* @dev The initialize function of the upgradeable contract.
1202+
* @dev Initializer of the upgradeable contract.
12031203
*
12041204
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
12051205
*/

.cursor/rules/solidity-rules.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ alwaysApply: false
208208
/**
209209
* @dev The data of a single operation of the blueprint smart-contract.
210210
*
211-
* The fields:
211+
* Fields:
212212
*
213213
* - status --- The status of the operation according to the {OperationStatus} enum.
214214
* - account -- The address of the account involved in the operation.
@@ -218,7 +218,7 @@ alwaysApply: false
218218
uint8 status;
219219
address account;
220220
uint64 amount;
221-
// uint24 __reserved; // Reserved for future use until the end of the storage slot
221+
// uint24 __reserved; // Reserved until the end of the storage slot
222222
}
223223
```
224224

@@ -233,7 +233,7 @@ alwaysApply: false
233233
// Slot 2
234234
uint64 balance;
235235
uint32 operationCount;
236-
// uint160 __reserved; // Reserved for future use until the end of the storage slot
236+
// uint160 __reserved; // Reserved until the end of the storage slot
237237
}
238238
```
239239

contracts/BalanceFreezer.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ contract BalanceFreezer is
3838
/**
3939
* @dev Constructor that prohibits the initialization of the implementation of the upgradeable contract.
4040
*
41-
* See details
41+
* See details:
4242
* https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable#initializing_the_implementation_contract
4343
*
4444
* @custom:oz-upgrades-unsafe-allow constructor
@@ -85,7 +85,7 @@ contract BalanceFreezer is
8585
* - The requirements of the related token contract function must be met.
8686
*/
8787
function freeze(
88-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
88+
address account, // Tools: prevent Prettier one-liner
8989
uint256 amount,
9090
bytes32 txId
9191
) external whenNotPaused onlyRole(FREEZER_ROLE) {

contracts/BalanceFreezerStorageLayout.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract contract BalanceFreezerStorageLayout is IBalanceFreezerTypes {
2424
/**
2525
* @dev Defines the contract storage structure.
2626
*
27-
* The fields:
27+
* Fields:
2828
*
2929
* - token ------- The address of the underlying token.
3030
* - operations -- The mapping of an operation structure for a given off-chain transaction identifier.

contracts/interfaces/IBalanceFreezer.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface IBalanceFreezerPrimary is IBalanceFreezerTypes {
4141
* @param txId The off-chain identifier of the transaction that caused the transfer.
4242
*/
4343
event FrozenBalanceTransfer(
44-
address indexed from, // Tools: this comment prevents Prettier from formatting into a single line.
44+
address indexed from, // Tools: prevent Prettier one-liner
4545
uint256 amount,
4646
bytes32 indexed txId,
4747
address indexed to
@@ -59,7 +59,7 @@ interface IBalanceFreezerPrimary is IBalanceFreezerTypes {
5959
* @param txId The off-chain identifier of the balance frozen updating operation.
6060
*/
6161
function freeze(
62-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
62+
address account, // Tools: prevent Prettier one-liner
6363
uint256 amount,
6464
bytes32 txId
6565
) external;
@@ -74,7 +74,7 @@ interface IBalanceFreezerPrimary is IBalanceFreezerTypes {
7474
* @param txId The off-chain identifier of the balance frozen updating operation.
7575
*/
7676
function freezeIncrease(
77-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
77+
address account, // Tools: prevent Prettier one-liner
7878
uint256 amount,
7979
bytes32 txId
8080
) external;
@@ -89,7 +89,7 @@ interface IBalanceFreezerPrimary is IBalanceFreezerTypes {
8989
* @param txId The off-chain identifier of the balance frozen updating operation.
9090
*/
9191
function freezeDecrease(
92-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
92+
address account, // Tools: prevent Prettier one-liner
9393
uint256 amount,
9494
bytes32 txId
9595
) external;
@@ -107,7 +107,7 @@ interface IBalanceFreezerPrimary is IBalanceFreezerTypes {
107107
* @param txId The off-chain identifier of the transfer operation.
108108
*/
109109
function transferFrozen(
110-
address from, // Tools: this comment prevents Prettier from formatting into a single line.
110+
address from, // Tools: prevent Prettier one-liner
111111
address to,
112112
uint256 amount,
113113
bytes32 txId

contracts/interfaces/IBalanceFreezerTypes.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface IBalanceFreezerTypes {
3030
/**
3131
* @dev The data of a single freezing operation.
3232
*
33-
* The fields:
33+
* Fields:
3434
*
3535
* - status --- The status of the operation according to the {Status} enum.
3636
* - account -- The address of the account whose frozen balance was updated or transferred from.
@@ -40,6 +40,6 @@ interface IBalanceFreezerTypes {
4040
OperationStatus status;
4141
address account;
4242
uint64 amount;
43-
// uint24 __reserved; // Reserved for future use until the end of the storage slot.
43+
// uint24 __reserved; // Reserved until the end of the storage slot.
4444
}
4545
}

contracts/interfaces/IERC20Freezable.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface IERC20Freezable {
1919
* @return oldBalance The frozen balance of the account before the update.
2020
*/
2121
function freeze(
22-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
22+
address account, // Tools: prevent Prettier one-liner
2323
uint256 amount
2424
) external returns (uint256 newBalance, uint256 oldBalance);
2525

@@ -45,7 +45,7 @@ interface IERC20Freezable {
4545
* @return oldBalance The frozen balance of the account before the decrease.
4646
*/
4747
function freezeDecrease(
48-
address account, // Tools: this comment prevents Prettier from formatting into a single line.
48+
address account, // Tools: prevent Prettier one-liner
4949
uint256 amount
5050
) external returns (uint256 newBalance, uint256 oldBalance);
5151

@@ -59,7 +59,7 @@ interface IERC20Freezable {
5959
* @return oldBalance The frozen balance of the `from` account before the transfer.
6060
*/
6161
function transferFrozen(
62-
address from, // Tools: this comment prevents Prettier from formatting into a single line.
62+
address from, // Tools: prevent Prettier one-liner
6363
address to,
6464
uint256 amount
6565
) external returns (uint256 newBalance, uint256 oldBalance);

contracts/interfaces/IVersionable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface IVersionable {
1313
/**
1414
* @dev Defines the version of a contract.
1515
*
16-
* The fields:
16+
* Fields:
1717
*
1818
* - major -- The major version of the contract.
1919
* - minor -- The minor version of the contract.

contracts/mocks/base/AccessControlExtUpgradeableMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ contract AccessControlExtUpgradeableMock is AccessControlExtUpgradeable, UUPSUpg
1818
// ------------------ Initializers ---------------------------- //
1919

2020
/**
21-
* @dev The initialize function of the upgradeable contract.
21+
* @dev Initializer of the upgradeable contract.
2222
*
2323
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
2424
*/

contracts/mocks/base/PausableExtUpgradeableMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ contract PausableExtUpgradeableMock is PausableExtUpgradeable, UUPSUpgradeable {
1515
// ------------------ Initializers ---------------------------- //
1616

1717
/**
18-
* @dev The initialize function of the upgradeable contract.
18+
* @dev Initializer of the upgradeable contract.
1919
*
2020
* See details: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable
2121
*/

0 commit comments

Comments
 (0)