Support contract initializitation arguments with `flow dev`
Open
@devbugging is already working on this.
Since Apr 5, 2023.
Feature
Feedback
- Dominant language
- Go
- Stars
- 209
- Forks
- 87
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 3
Description
Currently, contract initialization parameters are not supported in flow.json. If you try to use flow dev with a contract that has init params, you'll get this error:
Deploying a contract failed because it requires initialization arguments. We currently don't support passing initialization arguments, so we suggest you hardcode the initialization arguments in the init function to be used during development.
There is a corresponding TODO item in the code:
We probably need to change the syntax of deployments section to support arguments per contract deployed. Using deployments has the benefit of deploying multiple instances of the same contract using different param sets.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.