Random port on integrated devnet#202
Conversation
FabijanC
left a comment
There was a problem hiding this comment.
Should we update any of the tests for this?
There was a problem hiding this comment.
What happens if the user provided --port in args in hardhat config?
| hre.config.networks.integratedDevnet.url = networkUrl; | ||
| const { hostname, port } = new URL(hre.config.starknet.networkUrl); | ||
| const isPortFree = await isFreePort(parseInt(port)); | ||
| if (!isPortFree) { |
There was a problem hiding this comment.
Why this check? Couldn't it surprise the user if we just silently change the specified port. If the port is occupied, integrated-devnet spawner will inform the user about that, right?
My understanding was that we should find a free port only if the user didn't provide a URL? Now I'm actually thinking, is it even possible for the user to omit the URL? Can the type extensions file be modified to allow that?
|
As already discussed, this doesn't have to be a part of release-0.7.0 if we keep URL as a config option. Currently waiting for response from hardhat: NomicFoundation/hardhat#3221 |
|
New issue to followup on hardhat that could resolve this. NomicFoundation/hardhat#3323 |
Usage related changes
Development related changes
Checklist:
testdirectory (with a test case consisting ofnetwork.json,hardhat.config.ts,check.sh)pluginbranch ofstarknet-hardhat-example:test.shto use my example repo branchtest.shto to use the original branch (after the example repo PR has been merged)