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: - [ ] Add package.json in `contracts/` directory. We can base it off of the Open Zeppelin one: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/package.json - [ ] Replace all `@openzeppelin-contracts` imports with `@openzeppelin/contracts` imports in Solidity files (thanks to @Yhtiyar for pointing this out) - [ ] Update `brownie-config.yml` to reflect the new remapping for Open Zeppelin imports
Currently, running a
hardhat compilein a repo that contains@moonstream/contractsimports breaks.This is because there is no
@moonstream/contractspackage on NPM and hardhat uses NPM packages to manage dependencies.See conversation on Moonstream Discord: https://discord.com/channels/867156607644860418/954495097406382120/1015381496082726983
Thanks to
defikrisfor 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-contractsimports with@openzeppelin/contractsimports in Solidity files (thanks to @Yhtiyar for pointing this out)brownie-config.ymlto reflect the new remapping for Open Zeppelin imports