Open zomglings opened 2 years ago
Currently, running a hardhat compile in a repo that contains @moonstream/contracts imports breaks.
hardhat compile
@moonstream/contracts
This is because there is no @moonstream/contracts package on NPM and hardhat uses NPM packages to manage dependencies.
See conversation on Moonstream Discord: https://discord.com/channels/867156607644860418/954495097406382120/1015381496082726983
Thanks to defikris for pointing this out.
defikris
This is what we need to do to enable hardhat support:
contracts/
@openzeppelin-contracts
@openzeppelin/contracts
brownie-config.yml
Foundry is using hardhat-preprocessor to deal with remappings: https://book.getfoundry.sh/config/hardhat
hardhat-preprocessor
Currently, running a
hardhat compile
in a repo that contains@moonstream/contracts
imports breaks.This is because there is no
@moonstream/contracts
package on NPM and hardhat uses NPM packages to manage dependencies.See conversation on Moonstream Discord: https://discord.com/channels/867156607644860418/954495097406382120/1015381496082726983
Thanks to
defikris
for pointing this out.This is what we need to do to enable hardhat support:
contracts/
directory. We can base it off of the Open Zeppelin one: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/package.json@openzeppelin-contracts
imports with@openzeppelin/contracts
imports in Solidity files (thanks to @Yhtiyar for pointing this out)brownie-config.yml
to reflect the new remapping for Open Zeppelin imports