Replies: 4 comments 5 replies
-
The same reason why we don't have them alphabetically ordered in other create structs in DataTypes i.e. similar field types are put next to each other. struct ConstructorParams {
address initialAdmin;
IERC20 asset;
string ipfsCID;
string name;
bytes32 merkleRoot;
uint40 expiration;
bool cancelable;
bool transferable;
} vs struct ConstructorParams {
IERC20 asset;
bool cancelable;
uint40 expiration;
address initialAdmin;
string ipfsCID;
bytes32 merkleRoot;
string name;
bool transferable;
} If we order them alphabetically then we should follow the same pattern for other memory structs too. Isn't? |
Beta Was this translation helpful? Give feedback.
-
Issues opened: |
Beta Was this translation helpful? Give feedback.
-
Original reply from sablier-labs/v2-core#888 (comment):
|
Beta Was this translation helpful? Give feedback.
-
I made a mistake by asking you to repost your comments in this discussion, @razgraf, @andreivladbrg. Sorry for that. There are two ideas intertwined in this thread:
Andrei and Razvan's criticism is valid for the 2nd idea, but not the 1st:
Given the rationale above, I went ahead and made a PR to order the fields alphabetically in this particular struct: |
Beta Was this translation helpful? Give feedback.
-
Here:
v2-periphery/src/types/DataTypes.sol
Lines 101 to 110 in 06ffb31
Cc @sablier-labs/solidity.
Beta Was this translation helpful? Give feedback.
All reactions