Skip to content

Conversation

@rynobey
Copy link
Contributor

@rynobey rynobey commented Sep 9, 2021

This PR adds two small features:

  • A new hook that gets called right before compiling the instrumented source code (onPreCompile)
  • The ability to specify an alternative temporary directory to use for the instrumented source code

I have made an attempt to update the documentation and added the hook to the existing test - please let me know if I can add anything else to make the PR more complete.

rynobey added 3 commits April 6, 2021 16:26
update to latest upstream version
Update master with upstream
#3)

* Added onPreCompile hook

* Added configurable temporary contracts directory

* Added test for new onPreCompile hook

* Updated documentation
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.69%. Comparing base (67b711d) to head (8d5add2).
Report is 152 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #664   +/-   ##
=======================================
  Coverage   98.68%   98.69%           
=======================================
  Files          22       22           
  Lines         991      993    +2     
=======================================
+ Hits          978      980    +2     
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cgewecke cgewecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks so much!

Would it be possible to add docs for the hook and the new temp contracts directory option to the config options table in the

  • README.md
  • HARDHAT_README.md

A brief sentence about how the preCompile hook is useful would also be nice.

(That table is a bit painful to add to in markdown, sorry about this...)

@rynobey rynobey requested a review from cgewecke September 9, 2021 15:08
Copy link
Member

@cgewecke cgewecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, thanks again.

(Will hopefully publish this weekend)

@cgewecke cgewecke merged commit cdab28c into sc-forks:master Sep 9, 2021
@rynobey
Copy link
Contributor Author

rynobey commented Jan 11, 2022

Hi @cgewecke, just wanted to follow up - I could be missing it but I don't see any new releases containing this work (yet)?

@cgewecke
Copy link
Member

Hi! I'm so sorry. I thought I had published this, thanks for the ping.

I'need to add some tests for #667 tomorrow and will merge and publish then.

@rynobey
Copy link
Contributor Author

rynobey commented Jan 12, 2022

Awesome :) Thanks!!

@cgewecke
Copy link
Member

This is now published in 0.7.18

@rynobey
Copy link
Contributor Author

rynobey commented Jan 18, 2022

Awesome!

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.

3 participants