Bump @chainlink/contracts to v1.5.0 + Add remapping support#199
Merged
thodges-gh merged 8 commits intosmartcontractkit:mainfrom Oct 7, 2025
Merged
Bump @chainlink/contracts to v1.5.0 + Add remapping support#199thodges-gh merged 8 commits intosmartcontractkit:mainfrom
thodges-gh merged 8 commits intosmartcontractkit:mainfrom
Conversation
The recent release of contracts@v1.5.0 unvendors a number of contracts. 1.5.0 utilizes remappings to resolve the import paths for these dependency packages. - Upgraded to @chainlink/contracts@v1.5.0 - Added helper js file to handle remappings using hardhat-preprocessor - Added remappings.txt that contains remappings - Updated hardhat.config.js to include remapping preprocessor
- Updated README to include remapping section, warning of third party plugin, and a link to the HH3 branch - Updated remappings.txt to specify the node_modules directory for each remapping. This is not required as hardhat 2 searched the node_modules directory for external libraries by default. However, including it allows developers to better understand exactly what is happeng (or where the remapping is going to).
thodges-gh
reviewed
Oct 2, 2025
zeuslawyer
approved these changes
Oct 3, 2025
thodges-gh
requested changes
Oct 6, 2025
Pinned @chainlink/contracts@v1.5.0
thodges-gh
approved these changes
Oct 7, 2025
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.
Summary
This PR modernizes the Hardhat 2 starter kit to work with the unvendored layout in
@chainlink/contracts@1.5.0and documents a way to use Solidity import remappings in HH2 viahardhat-preprocessor.What changed
@chainlink/contractsto v1.5.0hardhat-preprocessorand a small helper to rewrite Solidity imports based on aremappings.txt. Wire it intohardhat.config.jsviapreprocess.contracts@1.5.0(e.g.,vrf/VRFCoordinatorV2_5.abi.json,shared/LinkToken.abi.json).hardhat-preprocessor, and a warning that it’s a third-party plugin.remappings.txtmore explicit by pointing each alias to itsnode_moduleslocation (clearer for newcomers even though HH2 already searchesnode_modules).remappings-helper.jsto explain how the loader and preprocessor hook work.Why
@chainlink/contracts@1.5.0un-vendors several packages and changes import locations; without remapping, HH2 users hit broken imports or long relative paths. Remapping keeps imports clean & resilient.