Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing deployments section stops script execution #1201

Closed
chasefleming opened this issue Sep 18, 2023 · 2 comments · Fixed by #1247
Closed

Missing deployments section stops script execution #1201

chasefleming opened this issue Sep 18, 2023 · 2 comments · Fixed by #1247
Assignees
Labels
Bug The issue represents a bug, malfunction, regression Feedback

Comments

@chasefleming
Copy link
Member

You can add a contract with flow accounts add-contract ./HelloWorld.cdc --network emulator --signer test-acct, but if I go to run a script against it with flow scripts execute script.cdc --network emulator I will get the following error:

Command Error: import HelloWorld could not be resolved from provided contracts

If I add a deployments section it goes away. Note: this only happens with the new import syntax of import "HelloWorld"

Technically it should work without the deployments section since the contract is already deployed.

@chasefleming chasefleming added Bug The issue represents a bug, malfunction, regression Feedback labels Sep 18, 2023
@chasefleming chasefleming self-assigned this Sep 18, 2023
@gregsantos gregsantos moved this to 🔖 Ready for Pickup in 🌊 Flow 4D Sep 21, 2023
@bjartek
Copy link
Collaborator

bjartek commented Oct 25, 2023

I belive add-contract was added before there was flow deploy is this this really an command we need?

from looking at the code it does not look like it is added to flow.json at all. The AddContract method in Flowkit adds the contract if it is not present but it does not add a Deployment seciont.

@chasefleming
Copy link
Member Author

I can see use cases for wanting to deploy individual projects vs the entire project with flow deploy. I'd vote for keeping it. But yeah if there are issue we should solve them...which it looks like you just PR'd. Thanks for doing that. Will take a look.

@github-project-automation github-project-automation bot moved this from 🔖 Ready for Pickup to ✅ Done in 🌊 Flow 4D Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue represents a bug, malfunction, regression Feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants