update contract documentation
@@ -6,7 +6,7 @@ sidebar_title: Update a Contract
Update an existing contract deployed to a Flow account using the Flow CLI.
```shell
-flow accounts update-contract <name> <filename>
+flow accounts update-contract <name> <filename> [<argument> <argument>...] [flags]
```
## Example Usage
@@ -68,6 +68,25 @@ Name of the contract as it is defined in the contract source code.
Filename of the file containing contract source code.
+### Arguments
+- Name: `argument`
+- Valid inputs: valid [cadence values](https://docs.onflow.org/cadence/json-cadence-spec/)
+ matching argument type in transaction code.
+
+Input arguments values matching corresponding types in the source code and passed in the same order.
+
+Example:
+```shell
+> flow accounts update-contract HelloWorld ./contract.cdc Hello 2
+```
+Transaction code:
+```
+pub contract HelloWorld {
+ init(a:String, b:Int) {
+ }
+}
+```
+
## Flags
### Signer
@@ -77,6 +96,16 @@ Filename of the file containing contract source code.
Specify the name of the account that will be used to sign the transaction.
+### Arguments JSON
+
+- Flag: `--args-json`
+- Valid inputs: arguments in JSON-Cadence form.
+- Example: `flow accounts update-contract HelloWorld ./tx.cdc '[{"type": "String", "value": "Hello"}]'`
+
+Arguments passed to the Cadence transaction in Cadence JSON format.
+Cadence JSON format contains `type` and `value` keys and is
+[documented here](https://docs.onflow.org/cadence/json-cadence-spec/).
+
### Include Fields
- Flag: `--include`
