Skip to content

Remove dependency on Hardhat#180

Open
frangio wants to merge 2 commits intomasterfrom
remove-hardhat-dep
Open

Remove dependency on Hardhat#180
frangio wants to merge 2 commits intomasterfrom
remove-hardhat-dep

Conversation

@frangio
Copy link
Copy Markdown
Contributor

@frangio frangio commented Jan 30, 2026

Because Hardhat v3 is async ESM it cannot be required. This removes that dependency by adding a flag --paths that should be used to compute the paths before invoking the transpiler. Note that paths also have to be adjusted to v2 shape at the moment, e.g.:

paths="$(node <<'EOF'
  import { config } from "hardhat";
  const { paths } = config;
  paths.sources = paths.sources.solidity[0];
  console.log(JSON.stringify(paths))
EOF
)"

npx @openzeppelin/upgrade-safe-transpiler --paths "$paths" ...

@frangio frangio marked this pull request as ready for review January 30, 2026 20:30
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