frangio / hardhat-exposed

Automatically expose internal Solidity functions for smart contract testing.
82 stars 13 forks source link

Use prefix in exposed file name #31

Closed RenanSouza2 closed 8 months ago

RenanSouza2 commented 8 months ago

Hello @frangio, I made this PR to be able to use hardhat-exposed with a hardhat typescript project

frangio commented 8 months ago

Can you describe the problem and how this fixes it?

This is technically a breaking change because it would break scripts that load artifacts using the fully qualified name contracts-exposed/A.sol:$A.

RenanSouza2 commented 8 months ago

Typechain doesn't accept two files with the same name

Using the prefix in the file would fix that

I was thinking about closing this pr for two reasons tbh:

About the breaking change I thought in maybe only using the prefix if the user sets one, would still be breaking but only if there is a set prefix but somewhat better

Let me know what you think

frangio commented 8 months ago

there is a bug in typechain when a file starts with $

This seems like a dealbreaker. I'm sad that Typechain is deprecated but given that I agree it might be better to close this.