forge-std icon indicating copy to clipboard operation
forge-std copied to clipboard

Add forge-std and ds-test as NPM modules for Hardhat backwards compatibility

Open 0x6080 opened this issue 2 years ago • 2 comments

Component

Forge

Describe the feature you would like

Issue described in detail here.

Many of use would like to use Foundry + Hardhat, which still has tons of use cases (integration testing, complex deployment scripts, etc) and should really not be treated as a direct competitor. However, there are some small inconveniences that we have found when trying to do this.

As shown in the issue, it can almost be tidied up into one source of truth for all dependencies by mapping the paths the Forge uses to node_modules. But since ds-test and forge-std do not have NPM modules, you still need to maintain a ./lib directory and remappings.txt.

The simplest fix would probably be to wrap these dependencies in NPM modules. This probably has use-cases outside just the one described above, but would help immensely for all the Hardhat folks that want to give Foundry a go.

Thanks! 🙏

Additional context

No response

0x6080 avatar Apr 18 '22 14:04 0x6080

I'm transferring this issue to Forge Std, since it should happen in that repository - can you also open up a related issue in https://github.com/dapphub/ds-test/? We do not have write permission to that repository :smile:

onbjerg avatar Apr 18 '22 15:04 onbjerg

I've published a version on NPM, you can import it in a hardhat project too (sharing if that is useful). https://www.npmjs.com/package/@float-capital/ds-test

JasoonS avatar May 05 '22 13:05 JasoonS