Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ZKChain and Gateway Upgrade Audit #1052

Open
wants to merge 66 commits into
base: gw-audit-2-fixes
Choose a base branch
from

Conversation

Raid5594
Copy link
Collaborator

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Raid Ateir added 24 commits October 30, 2024 17:53
Copy link

Coverage after merging ra/gw-audit-2-merged-fixes into gw-audit-2-fixes will be

86.30%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../da-contracts/contracts
   RollupL1DAValidator.sol64.94%37.50%83.33%70.91%145, 148, 148, 148, 150, 183–184, 187–188, 27, 27–28, 30, 30–31, 34, 36–37, 41–42, 65, 67, 67, 67–68, 70
contracts/bridge
   BridgeHelper.sol93.33%50%100%100%22
   BridgedStandardERC20.sol74.03%25%92.31%76.79%110–111, 116–117, 129–130, 153–154, 195, 195, 202, 202, 209, 209, 220, 54–55, 81–82
   L1ERC20Bridge.sol93.48%80%100%94.12%188–189, 269
   L1Nullifier.sol77.78%56.52%81.48%84.33%110–111, 126, 126–127, 156–157, 180, 199, 206–207, 209–210, 219–220, 228–229, 231, 396, 398–399, 399, 399, 401–402, 402, 402, 413–414, 427–428, 449–450, 489, 583, 669, 671, 673, 686, 700, 705
contracts/bridge/asset-router
   AssetRouterBase.sol83.78%40%100%88%138–139, 57–58, 85–86
   L1AssetRouter.sol88.89%71.43%92%92.66%201–202, 238, 247, 249, 252, 378–380, 57–58, 580, 73–74, 81–82
contracts/bridge/ntv
   L1NativeTokenVault.sol95.70%95%92.31%96.67%209, 209–210
   NativeTokenVault.sol86.16%62.50%91.30%90.18%192, 194, 213–214, 221–222, 255–256, 388–389, 396, 398, 412–413, 439–440, 474, 479, 64–65
contracts/bridgehub
   Bridgehub.sol82.12%50.77%95.35%88.74%114–115, 122–123, 129–130, 136, 136–137, 171–172, 219, 227–228, 230–231, 234–235, 245–246, 260–261, 310–311, 313–314, 372–373, 388–389, 419–420, 499–500, 581, 680, 683–684, 688–689, 722–723, 736, 779–780, 782–783, 785–786, 820–821, 824–825, 827–828, 863, 868
   CTMDeploymentTracker.sol79.07%50%90%94.74%114, 118, 33, 40, 63, 90, 93, 95
   MessageRoot.sol91.07%63.64%100%96.97%116–117, 148, 69, 87
contracts/common
   ReentrancyGuard.sol90%66.67%100%92.86%78–79
contracts/common/libraries
   DataEncoding.sol72.97%37.50%100%76.19%108, 112, 119, 143, 143–145, 148, 75, 83
   DynamicIncrementalMerkle.sol74.42%100%80%72.22%67–70, 72–74, 76–78
   FullMerkle.sol100%100%100%100%
   L2ContractHelper.sol44.44%0%50%52%100, 100–101, 109, 139, 143, 56, 68–69, 74–75, 78–79, 93, 95, 95–96
   Merkle.sol96.61%90.91%100%97.67%81–82
   MessageHashing.sol100%100%100%100%
   SemVer.sol100%100%100%100%
   SystemContractsCaller.sol0%0%0%0%114, 122–125, 135–138, 138–139, 141, 141–142, 33, 33–34, 37, 45, 47, 49, 51, 53, 66, 66, 66, 69, 72, 75, 78, 89, 91, 93, 96, 98
   UncheckedMath.sol100%100%100%100%
   UnsafeBytes.sol84.21%100%83.33%84.62%35–36
contracts/governance
   AccessControlRestriction.sol100%100%100%100%
   ChainAdmin.sol95.12%80%100%96.15%27–28
   Governance.sol98.15%94.74%100%98.55%45–46
   PermanentRestriction.sol89.43%82.61%100%89.41%110, 110–111, 138, 201, 201–202, 205, 207, 207–208, 248–249
contracts/state-transition
   ChainTypeManager.sol67.28%33.33%60%77.67%108, 135–136, 138–139, 141–142, 144–145, 200–201, 245, 252, 270, 276, 283, 295, 302, 309, 317, 324, 332, 339, 357, 359, 423, 442, 442, 442, 444, 444, 444, 446, 459, 464, 489, 74, 87–88
   TestnetVerifier.sol77.78%66.67%100%75%16, 28
   ValidatorTimelock.sol95%83.33%100%95.12%196, 78–79
   Verifier.sol89.90%40%96.30%90.93%1674–1675, 287–302, 305–308, 311–318, 321–328, 331–332, 335–336, 339, 383–384, 394–395, 405–406, 416–417, 427–428, 443–444, 453, 453–454, 905–906
contracts/state-transition/chain-deps
   DiamondInit.sol78%45.45%100%86.49%39–40, 42–43, 45–46, 48–49, 51–52, 77
   DiamondProxy.sol92.31%75%100%100%16, 27
contracts/state-transition/chain-deps/facets
   Admin.sol72.69%36.21%90.91%85.29%104–105, 115–116, 130, 130–131, 133–134, 157, 157, 157–158, 158, 158, 160, 239, 241, 254–255, 261, 263, 266, 266, 266, 284, 295–296, 301, 313, 313, 315, 315, 315, 321, 321, 321–322, 322, 322–324, 324, 324–325, 325, 325–327, 353, 355, 359, 368, 378, 382, 40, 40
   Executor.sol76.13%57.14%92%81.25%120–121, 173, 178, 183, 188, 193, 198, 202–203, 208, 208–209, 209–210, 212, 212–213, 223, 227, 227–228, 246–247, 268, 271, 317, 317–318, 322, 326,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants