-
Notifications
You must be signed in to change notification settings - Fork 161
chore(contracts): fix solidity linting issues across all packages #1239
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
Conversation
- Add NatSpec documentation (@title, @author, @notice, @param) - Add solhint-disable directives with TODO comments for future fixes - Minor code formatting changes to address lint rules All packages now pass pnpm lint with no reported issues. Verified with scripts/compare-repo-contract-bytecode-excluding-metadata.mjs: only mock contracts have functional bytecode changes.
chore(contracts): fix solidity linting issues across all packages
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1239 +/- ##
==========================================
+ Coverage 82.84% 84.06% +1.21%
==========================================
Files 47 42 -5
Lines 2093 2071 -22
Branches 620 615 -5
==========================================
+ Hits 1734 1741 +7
+ Misses 359 330 -29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Move 36 duplicate interface files from contracts and token-distribution to interfaces package - Update all import statements across contracts, token-distribution, horizon, and subgraph-service to use @graphprotocol/interfaces - Delete duplicate interface files from source packages - Fix pragma versions for compatibility across compiler configurations - Add @graphprotocol/interfaces dependency to token-distribution All builds and tests passing.
- Dual-version interfaces: ^0.7.x || ^0.8.0 (max compatibility) - V0.8-only interfaces: ^0.8.22 (modern features support) Interfaces should allow wider compiler version ranges for external consumer compatibility, while implementations use exact versions for predictable compilation. Dual-version files use ^0.8.0 since they can't leverage v0.8 features anyway. V0.8-only files use ^0.8.22 for custom errors and named mappings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add explanation of open-ended pragma ranges for interface compatibility and document available TypeScript type generation formats.
|
Replaced by: #1242 |
Status:
This PR resolves all Solidity linting issues across the monorepo, enabling clean
pnpm lintexecution.Additionally:
Summary
@title,@author,@notice,@param,@return,@dev)Solhint Suppressions Added
Most common suppressed rules (all include TODO comments for future fixes):
gas-indexed-events(36) - Event parameters withoutindexeduse-natspec(36) - Legacy code without documentationnamed-parameters-mapping(25) - Requires Solidity ≥0.8.18immutable-vars-naming(19) - Non-UPPER_CASE immutablesgas-strict-inequalities(15) - Using<=vs<gas-custom-errors(7) - Usingrequire(0.7.6 limitation)no-inline-assembly(5) - Critical assembly blocksconst-name-snakecase(3) - Non-UPPER_CASE constantsVerification
✅ Bytecode comparison (compare script): Only mock/test contracts have functional changes (added
indexedto events). All production contracts are functionally identical.✅ All packages pass
pnpm lintwith zero errors/warnings