Open hats-bug-reporter[bot] opened 2 months ago
Thanks, but not a low issue
Also, just note that the error reads CirclesArraysLengthMismatch
it does not state that both need to be equal, that is your misinterpretation.
@benjaminbollen thanks for your comment.
I know the CirclesArraysLengthMismatch
error does not state that both values need to be equal, and it's technically impossible because _numberOfTriplets
is always multiplied by 6. However, my point is that this error reverts due to incorrect mismatch values.
For example:
If _packedData.length
= 12
and _numberOfTriplets
= 3,
the function reverts due to this logic:
12 != 18 (3 * 6) => revert
However, the error message will show a mismatch between 12 and 3, while the actual logic compares 12 and 18.
This issue highlights the mismatch between the actual logic and the error message, and I think it can be classified as a Low severity issue.
Thanks.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xb7c453dded125381b30b64a92528293a819041fa019bf5eb4e890399917b5bfc Severity: low
Description: Description\ The function
_unpackCoordinates()
containsif()
condition that checks if:However, incorrect error message is being reverted in
CirclesArraysLengthMismatch(_packedData.length, _numberOfTriplets, 6);
._numberOfTriplets
is multiplied by 6 in the if condition, but in the error message, it is only_numberOfTriplets
, causing a mismatch between the logic and the revert error.Recommendation\ To fix this, the revert error message should correctly reflect the logic as follows: