This error was quite confusing to me, as my flow.json didn't have any mention of "previewnet", so I wasn't sure what's going on.
I would expect the flowkit logic to automatically add "previewnet" in the internal networks config struct in cases like these, instead of requiring the dev to do so.
Note that this does not happen in the released version! This issue can be reproduced in the latest unreleased code since the commit: https://github.com/onflow/flowkit/commit/cc49f8310c70dfd47614c604288b47990e9a18b4
What are you currently working on that this is blocking?
Current Behavior
flowkit.Load
function returns acontract {ContractName} alias contains nonexisting network previewnet
error when these conditions are met:dependencies
section of flow.json, but not incontracts
sectionnetworks
sectionThis happens because when flowkit automatically populates missing contracts from dependency list, it uses all supported networks for core contracts: https://github.com/onflow/flowkit/blob/52f00d694be51f8bb1190ee380e6b02f68bfba9d/config/contract.go#L170
This is a regression since: https://github.com/onflow/flowkit/pull/55
Expected Behavior
This error was quite confusing to me, as my flow.json didn't have any mention of "previewnet", so I wasn't sure what's going on.
I would expect the flowkit logic to automatically add "previewnet" in the internal networks config struct in cases like these, instead of requiring the dev to do so.
Steps To Reproduce
./build.sh
to generate flow.wasmindex.html
and check developer consoleEnvironment
What are you currently working on that this is blocking?
I'm playing around with building a revamped web-based playground and have started testing with example scaffold projects (e.g. https://github.com/onflowser/flow-nft-scaffold). This was proposed in the grant: https://github.com/onflow/developer-grants/issues/260.