Skip to content
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

[WIP] Migrate Buidler plugin to Hardhat #540

Merged
merged 4 commits into from
Oct 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve path calculation.
  • Loading branch information
scnale committed Oct 13, 2020
commit d11147200731ba10f60070bc1c765b21a9248146
4 changes: 2 additions & 2 deletions plugins/buidler.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function plugin() {
if (measureCoverage) {
// The fully qualified name here is actually the global name in the solc input,
// but buidler uses the fully qualified contract names
for (const [fullyQualifiedName, source] of Object.entries(solcInput.sources)) {
const absolutePath = path.join(path.dirname(config.paths.sources), fullyQualifiedName);
for (const [sourceName, source] of Object.entries(solcInput.sources)) {
const absolutePath = path.join(config.paths.root, sourceName);
// Patch in the instrumented source code.
if (absolutePath in instrumentedSources) {
source.content = instrumentedSources[absolutePath];
Expand Down