Devise new package @truffle/from-hardhat for compatibility translation
(spun out from #5410)
In another not-consumer-first-PR (following #5418), here's a draft for a new package to provide generalized Hardhat support for use in other parts of Truffle. This builds on #5418 in that it uses those freshly-exported shims.
The idea here is to expose, roughly:
- detectHardhat() - to performantly check if it's a Hardhat project
- prepareConfig() - to produce a TruffleConfig with networks
- prepareCompilation() - to get the good stuff
This is just a first crack... stay tuned!
cc @alcuadrado in case you want to watch this PR - I plan to continue the bulk of #5410 here over the coming days/weeks.
cc @alcuadrado this @truffle/from-hardhat PR is now ready for review - I believe I handled the concerns you stated in #5410, but would love if you could take another look! Thank you!
Thanks @benjamincburns! Will merge when green.