Factory smart contract to make easier and safer usage of the `CREATE` and `CREATE2` EVM opcodes as well as of `CREATE3`-based (i.e. without an initcode factor) contract creations.
Hardhat v2.19.0 introduced configuration variables for user-specific values or for data that shouldn't be included in the code repository (i.e. a private key). Since we want to set an industry precedent, I completely remove any dotenv variables (I keep it in the .gitignore though for footgun protection) and use the new syntax vars.has andvars.get. I deliberately don't use a default value for vars.get but instead use vars.has("OPTIONAL_VARIABLE") ? [vars.get("OPTIONAL_VARIABLE")] : []; in order to be explicit about it already in the code.
🕓 Changelog
Hardhat
v2.19.0
introduced configuration variables for user-specific values or for data that shouldn't be included in the code repository (i.e. a private key). Since we want to set an industry precedent, I completely remove anydotenv
variables (I keep it in the.gitignore
though for footgun protection) and use the new syntaxvars.has
andvars.get
.I deliberately don't use a default value forvars.get
but instead usevars.has("OPTIONAL_VARIABLE") ? [vars.get("OPTIONAL_VARIABLE")] : [];
in order to be explicit about it already in the code.🐶 Cute Animal Picture