I would like to test a contract in the hardhat console, but in order to do so I need to deploy a number of supporting contracts which includes several libraries, and I handle that inside a deploymenment script.
What Im wondering if I can do that inside the console (started without a –network parameter) so its running its own isolated node inside console. I'm already using my running local node for something else and it already contains test data which I'd rather not have to recreate.
I tried un scripts/myDeployScript.ts
but that doesnt work in the console.
Best Answer
You can do it the same way you do into any
.js
files:Example
If
myTask
is defined like this example: