Upgrade to Hardhat 3 and Enhanced Development Tooling#197
Open
cybervoid0 wants to merge 41 commits into
Open
Conversation
- Enhanced .gitignore to include build artifacts and type definitions. - Refactored hardhat.config.ts to streamline network configurations and integrate new plugins. - Updated package.json to reflect version changes and new dependencies. - Modified tsconfig.json for improved TypeScript settings. - Removed yarn.lock to transition to npm for package management. - Refined RIFToken contract to inherit from the updated RIF implementation. - Adjusted test files to align with new module imports and address type definitions.
- Simplified test structure by updating import paths and removing unnecessary comments. - Replaced direct address references with calls to `getAddress()` for better clarity. - Enhanced event emission checks to specify parameter types for clarity. - Adjusted test cases to ensure consistency in handling addresses and expectations.
…prove address handling
…d updated import paths
…aths and address handling
…mport paths - Replaced direct address references with calls to `getAddress()` for better clarity. - Updated import paths to align with the new module structure. - Enhanced event emission checks to specify parameter types for consistency. - Streamlined test cases to ensure uniform handling of addresses and expectations.
…nd updated import paths
… updated import paths
- Removed unused plugins from ESLint configuration. - Updated package versions in package.json and package-lock.json for better compatibility and features. - Enhanced VSCode settings for improved formatting and linting support across different file types.
…Markdown support - Added support for JSON and Markdown linting by including respective plugins. - Configured new rules to enforce no duplicate keys in JSON and to disallow HTML in Markdown files.
…functionality - Added support for the hardhat-verify plugin in the Hardhat configuration. - Introduced new Rootstock testnet and mainnet network configurations. - Updated airdrop task to use options instead of parameters for better usability and clarity. - Enhanced airdrop task error handling and logging for improved user feedback.
- Refactored task implementations to use options instead of parameters for improved usability. - Updated import paths to include file extensions for better clarity and compatibility. - Enhanced error handling and logging in task actions for more informative feedback. - Adjusted type definitions for Governor contracts to align with new structure.
…mproved usability - Enhanced .gitignore to exclude new directories and files. - Updated .prettierrc to include the Solidity plugin for better formatting. - Modified ESLint configuration to include ignore patterns from .gitignore. - Refactored Hardhat tasks to improve import paths and type definitions. - Updated package.json and package-lock.json to include new dependencies and scripts for linting and formatting. - Improved error handling and logging in task implementations for better user feedback.
Dependency ReviewThe following issues were found:
|
…anagement and script execution
…packages in package-lock.json
…sions in package.json and package-lock.json
…ew improvements - Add solidity-lint.yml workflow as Slither alternative for Hardhat 3 compatibility - Update dependency_review.yml to ignore false positive in rif-token-contracts - Update slither.yml with clear migration path and alternative analysis - Enhance solhint configuration for better code quality - Remove TypeScript type checking from lint-staged for better performance
Freshenext
approved these changes
Sep 16, 2025
Freshenext
left a comment
Contributor
There was a problem hiding this comment.
I took a glance at all files; even larger ones. All was done was change code to make it compatible with V3; it looks good and tests are passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade to Hardhat 3 with Complete Test Suite Refactoring
What
This PR upgrades the project from Hardhat 2 to Hardhat 3 with a complete refactoring of the entire test suite to adopt the new Hardhat 3 syntax and patterns, alongside enhanced development tooling and code quality infrastructure.
Why
Key Changes
🧪 Complete Test Suite Refactoring ⭐
All test files have been completely refactored to use Hardhat 3 syntax (351 test cases):
Affected Test Files:
BetaBuilders.test.ts- NFT minting and governance testsEarlyAdopters.test.ts- Early adopter functionalityGovernor.test.ts- DAO governance mechanismsOGContributors.test.ts&OGPartners.test.ts- Original contributor NFTsPlushieSeries1.test.ts- NFT series functionalityRIFToken.test.ts- Token contract testsStRIFToken.*.test.ts- Staking token comprehensive test suiteTreasury.test.ts- Treasury management testsVanguard.test.ts- Vanguard NFT functionality🔧 Hardhat 3 Migration
@nomicfoundation/hardhat-toolbox-mocha-ethersplugin🛠 Task System Overhaul
All Hardhat tasks refactored for Hardhat 3 compatibility:
airdrop.ts- Updated deployment and execution patternscancelProposal.ts- Modern proposal managementstRifUpgradeV1-v2.ts- Enhanced upgrade mechanismsupdateIpfsFolder.ts&withdrawTreasury.ts- Improved task implementations📦 Package Management & Tooling
yarn.lockand standardized on npm📁 Project Structure Improvements
deployContracts.tswith modern patternsBreaking Changes
Migration Impact
Testing
Developer Experience