OZ recommends that contracts import its code using the node style so that they have out-of-the box compatibility with hardhat.
Note that CI will fail because of a formatting error. I've left the formatting change out of this PR to (a) keep it clean and specific to the issue above and (b) because that formatting error has already been fixed in #40 which will merge before this.
I manually tested that this can now be imported into a hardhat project without issue. Steps to do this were:
OZ recommends that contracts import its code using the node style so that they have out-of-the box compatibility with hardhat.
Note that CI will fail because of a formatting error. I've left the formatting change out of this PR to (a) keep it clean and specific to the issue above and (b) because that formatting error has already been fixed in #40 which will merge before this.
I manually tested that this can now be imported into a hardhat project without issue. Steps to do this were:
mkdir
+cd
into a new directorynpm init
npx hardhat
npm install @openzeppelin/contracts
npm install ScopeLift/flexible-voting#oz-audit-fixes-N01-hardhat-friendly-imports --save
/contracts
npx hardhat compile