Replies: 1 comment
-
I am throwing an error for what to do when the MNEMONIC is missing:
Actually a mnemonic is needed, at least the way I set up in the template. See lines 61-63. It is possible to not pass the mnemonic to the Hardhat network. But that's not good practice. Hardhat would use its default accounts, thus the tests would run against a different set of accounts across different chains (e.g. you may want to test against Ganache too). In certain cases, such as EIP-2612, this can lead to non-deterministic test results.
Find another auditor? It's a bad omen that they don't have the patience to create a Selectively loading the Hardhat config based on whether the MNEMONIC is set or not might:
|
Beta Was this translation helpful? Give feedback.
-
I just had the case where I send the link to my repo out for audit, and all I got was a complaint (concerning tests) that they did not work.
When running the tests with hardhat, no mnemonic is needed, so should not cause any error if env is not set.
Adding more and more chains, and verifying pages, it becomes more and more likely that you/somebody has not / does not want to set a certain env.
Ideally the presence would only be checked when the variable would really be needed. I.e. I want to deploy on BSC, then I would only need a mnemonic for that chain.
Any idea for a smart solution ?
Beta Was this translation helpful? Give feedback.
All reactions