Skip to content

refactor: remove packages/contracts - #1373

Draft
Maikol wants to merge 40 commits into
mainfrom
chore/contracts-removal-phase-0
Draft

Maikol wants to merge 40 commits into
mainfrom
chore/contracts-removal-phase-0

Conversation

@Maikol

@Maikol Maikol commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Removes packages/contracts and packages/contracts-test: frozen contracts move unchanged into the new graph-core and graph-token packages (bytecode checked by pnpm check:bytecode), RewardsManager is ported to Solidity 0.8 in issuance and L2GNS and L2Curation in subgraph-service with storage layouts checked by pnpm check:storage, the tests move to Foundry, dead code is deleted, the verified mainnet sources are archived in the private legacy package, and the Graph Studio billing contracts are imported unchanged as the private billing package. Each phase landed here as its own reviewed PR, following the design and plans in #1372.

For the audit, the new code is the two port commits 6da4c4e (RewardsManager) and ea25620 (L2GNS, GNS, L2Curation, their storage, Multicall, InitializableV3), read against the pre-port-0.7.6 tag, and the billing import, where bcdafc0 is the original code at billing-contracts 8b063db and 9667c7c only adapts package.json and scripts. The frozen moves are bytecode-identical, and packages/legacy/verified/** is an archive of already-verified source that isn't compiled. The ports' accepted differences are arithmetic reverts becoming Panic instead of SafeMath strings, the unused MathUtils min and weightedAverageRoundingUp deleted, and per-file compiler settings of 0.8.35 with 200 runs, no viaIR and cancun.

Important

Merge with a merge commit, not a squash: the port and billing commits are what the audit covers, and packages/legacy/README.md cites a commit from this history.

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.50495% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.68%. Comparing base (3c7ca93) to head (9667c7c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/billing/contracts/BanxaWrapper.sol 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1373      +/-   ##
==========================================
+ Coverage   91.47%   98.68%   +7.21%     
==========================================
  Files          81       48      -33     
  Lines        5326     3354    -1972     
  Branches      973      619     -354     
==========================================
- Hits         4872     3310    -1562     
+ Misses        433       17     -416     
- Partials       21       27       +6     
Flag Coverage Δ
unittests 98.68% <99.50%> (+7.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Maikol Maikol changed the title chore: prepare for removing packages/contracts refactor: remove packages/contracts Oct 26, 2026
Maikol added 22 commits October 29, 2026 14:33
Port the unique cases of rewards.test.ts to legacySuite.t.sol, map the
duplicates to the existing tests and delete the TS file. Move the shared
deny, oracle, reclaim and accrue helpers into shared.t.sol.
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.

1 participant