morpho-org / morpho-utils

Repository gathering useful libraries and contracts.
GNU Affero General Public License v3.0
64 stars 1 forks source link

[Tests] Fix bounds in the revert conditions #113

Closed QGarchery closed 1 year ago

QGarchery commented 1 year ago

The bounds are subtracting one instead of adding one, see failing tests in the first commit

github-actions[bot] commented 1 year ago

Changes to gas cost

Generated at commit: 80f75ddf89a8f2f6d85f86a485d385caca5ffec4, compared to commit: 7141ef633f74fed943c919403e94e5f80e9c5b72

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %

Full diff report 👇
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **PercentageMathMock contract** | 193,438 (0) | _percentMulUp_ | 356 (0) | **0.00%** | 404 (-16) | **-3.81%** | 404 (-49) | **-10.82%** | 453 (0) | **0.00%** | 4 (+1) | | **WadRayMathMock contract** | 370,205 (0) | _rayMulUp_
_wadMulUp_ | 402 (0)
401 (0) | **0.00%**
**0.00%** | 453 (-17)
449 (-16) | **-3.62%**
**-3.44%** | 453 (-52)
449 (-49) | **-10.30%**
**-9.84%** | 505 (0)
498 (0) | **0.00%**
**0.00%** | 4 (+1)
4 (+1) |