You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+202-2Lines changed: 202 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,14 @@ To use the Acurast CLI, type `acurast` followed by any of the available options
46
46
47
47
-`new <project-name>` - Create a new Acurast project from a template.
48
48
-`deploy [options] [project]` - Deploy the current project to the Acurast platform.
49
-
-`deployments <'ls' | <id>> --cleanup` - List, view and clean up deployments.
49
+
-`deployments [arg] [options]` - List, view, and manage deployments.
50
+
-`deployments ls` or `deployments list` - List all your deployments.
51
+
-`deployments <id>` - View details of a specific deployment.
52
+
-`deployments <id> --update-env-vars` - Update environment variables for a deployment.
53
+
-`deployments --cleanup` - Clean up old, finished deployments.
54
+
-`deployments <id> --cleanup` - Clean up a specific deployment.
55
+
-`deployments update script <deployment-id> <script-ipfs> [options]` - Update the script of a mutable deployment.
56
+
-`deployments update editor <deployment-id> <new-editor-address> [options]` - Transfer editor permissions for a mutable deployment.
50
57
-`live [options] [project]` - Setup a "live-code-processor" and run your project on the processor in real time.
51
58
-`init` - Create an acurast.json file and .env file.
52
59
-`open` - Open the Acurast resources in your browser.
@@ -84,7 +91,9 @@ The acurast.json file is generated by running acurast init. Here is an example c
84
91
"minProcessorReputation": 0,
85
92
"maxCostPerExecution": 100000000000,
86
93
"includeEnvironmentVariables": [],
87
-
"processorWhitelist": []
94
+
"processorWhitelist": [],
95
+
"mutability": "Immutable",
96
+
"reuseKeysFrom": null
88
97
}
89
98
}
90
99
}
@@ -137,6 +146,14 @@ ACURAST_MNEMONIC=abandon abandon about ...
137
146
-`minProcessorVersions`: The minimum processor versions that will be used for the deployment.
138
147
-`android`: The minimum Android version.
139
148
-`ios`: The minimum iOS version.
149
+
-`mutability`: The mutability of the deployment. Controls whether the deployment can be modified after creation.
150
+
-`"Immutable"`: The deployment cannot be modified after creation (default).
151
+
-`"Mutable"`: The deployment can be modified after creation.
152
+
-`reuseKeysFrom`: An optional array that allows reusing keys from a previous deployment, if that deployment was set to "Mutable". Format: `[MultiOrigin, string, number]` where:
153
+
- First element: The origin chain (currently only `"Acurast"` is supported)
154
+
- Second element: The address of the original deployer
@@ -221,6 +238,189 @@ When running `acurast deploy`, the environment variables will now automatically
221
238
222
239
When running interval based deployments with multiple executions, the environment variables can be updated between executions. To do that, update the `.env` file and run `acurast deployments <id> -e`. This will update the environment variables for the deployment with the given ID.
223
240
241
+
## Deployment Management
242
+
243
+
The Acurast CLI provides comprehensive deployment management capabilities, including the ability to update mutable deployments and transfer editor permissions.
"Acurast:invalid-address:123"# Invalid address format
360
+
"acurast:5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL:123"# Wrong case
361
+
"Acurast:5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL:-1"# Negative number
362
+
```
363
+
364
+
**Usage**:
365
+
366
+
-**All deployment operations** require the full deployment ID format: `"origin:address:number"`
367
+
-**Configuration** (reuseKeysFrom): You must use the full format as an array
368
+
369
+
**Finding your deployment ID**:
370
+
371
+
1. Run `acurast deployments ls` to see all your deployments
372
+
2. The deployment ID will be displayed in the list
373
+
3. For advanced operations, use the full format shown in the list
374
+
375
+
### Validation and Error Handling
376
+
377
+
The CLI provides comprehensive validation for all deployment management commands:
378
+
379
+
-**Deployment ID validation**: Ensures proper format and valid components
380
+
-**Address validation**: Verifies AccountId32 format for all addresses
381
+
-**IPFS hash validation**: Ensures scripts are provided as valid IPFS hashes
382
+
-**Permission validation**: Checks that you have the necessary permissions
383
+
-**Mutability validation**: Ensures the deployment is mutable before allowing updates
384
+
385
+
### Safety Features
386
+
387
+
-**Dry-run mode**: Preview changes before applying them
388
+
-**Confirmation prompts**: Require explicit confirmation for destructive operations
389
+
-**Error messages**: Clear, descriptive error messages for validation failures
390
+
-**Transaction feedback**: Display transaction hashes for successful operations
391
+
392
+
## Deployment Features
393
+
394
+
### Mutability
395
+
396
+
The `mutability` field controls whether a deployment can be modified after it has been created:
397
+
398
+
-**`"Immutable"`** (default): The deployment cannot be modified after creation. This is the recommended setting for production deployments as it ensures consistency and prevents harmful changes.
399
+
400
+
-**`"Mutable"`**: The deployment can be modified after creation. This is an advanced feature and should only be used with careful consideration because misuse could result in harmful updates.
401
+
402
+
### Key Reuse
403
+
404
+
The `reuseKeysFrom` field allows you to reuse keys from a previous deployment. This is useful when you want to maintain the same cryptographic keys across deployments. To use this, the referenced deployment has to be "Mutable".
405
+
406
+
**Format**: `[MultiOrigin, string, number]`
407
+
408
+
-**First element**: The origin chain (currently only `"Acurast"` is supported)
409
+
-**Second element**: The address of the original deployer (AccountId32 format)
410
+
-**Third element**: The deployment ID (u128 number)
0 commit comments