OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
826 stars 339 forks source link

Minor improvements to Utils package #1206

Closed andrew-fleming closed 17 hours ago

andrew-fleming commented 1 week ago

PR Checklist

This PR proposes to add fuzz tests for the math module (which only includes the average fn ATM)

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.12%. Comparing base (4c0e16f) to head (e578d7d). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1206 +/- ## ========================================== + Coverage 92.06% 92.12% +0.05% ========================================== Files 49 49 Lines 1399 1396 -3 ========================================== - Hits 1288 1286 -2 + Misses 111 110 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin) | Coverage Δ | | |---|---|---| | [packages/utils/src/cryptography/snip12.cairo](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?src=pr&el=tree&filepath=packages%2Futils%2Fsrc%2Fcryptography%2Fsnip12.cairo&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin#diff-cGFja2FnZXMvdXRpbHMvc3JjL2NyeXB0b2dyYXBoeS9zbmlwMTIuY2Fpcm8=) | `83.33% <ø> (ø)` | | | [packages/utils/src/deployments.cairo](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?src=pr&el=tree&filepath=packages%2Futils%2Fsrc%2Fdeployments.cairo&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin#diff-cGFja2FnZXMvdXRpbHMvc3JjL2RlcGxveW1lbnRzLmNhaXJv) | `95.00% <100.00%> (+3.69%)` | :arrow_up: | | [packages/utils/src/structs/checkpoint.cairo](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?src=pr&el=tree&filepath=packages%2Futils%2Fsrc%2Fstructs%2Fcheckpoint.cairo&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin#diff-cGFja2FnZXMvdXRpbHMvc3JjL3N0cnVjdHMvY2hlY2twb2ludC5jYWlybw==) | `91.07% <ø> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin). Last update [4c0e16f...e578d7d](https://app.codecov.io/gh/OpenZeppelin/cairo-contracts/pull/1206?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenZeppelin).

🚨 Try these New Features: