Skip to content

Cannot update contract without init args #1961

@sisyphusSmiling

Description

@sisyphusSmiling

Problem

When updating a contract, Flow CLI demands a deployment parameter even though the contract is not being reinitialized

Steps to Reproduce

  1. Deploy a contract with an init arg such as
access(all) contract A {
    init(i: Int) {}
}
  1. Make a change to the contract and attempt to update the contract
access(all) contract A {
    access(all) fun foo() { return }
    init(i: Int) {}
}
  1. Flow CLI will result in the following error
❌ Command Error: provided arguments length mismatch, required arguments 1, but provided 0

Acceptance Criteria

Can update contracts without including initialization args.

Context

Deploying VM bridge contracts to Testnet.

Metadata

Metadata

Assignees

Labels

BugThe issue represents a bug, malfunction, regression

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions