This repository has been archived by the owner on May 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Add set-controller to doc #232
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,8 @@ For reference information and examples that illustrate using `+dfx canister+` co | |
|
||
|<<dfx canister request-status,`+request-status+`>> |Requests the status of a call to a canister. | ||
|
||
|<<dfx canister set-controller,`+set-controller+`>> |Specifies the identity name or principal to use as the new controller for a specified canister on the Internet Computer network. | ||
|
||
|<<dfx canister start,`+start+`>> |Restarts a stopped canister. | ||
|
||
|<<dfx canister status,`+status+`>> |Requests the running status of a canister. | ||
|
@@ -570,6 +572,59 @@ dfx canister request-status 0x58d08e785445dcab4ff090463b9e8b12565a67bf436251d13e | |
|
||
This command displays an error message if the request identifier is invalid or refused by the canister. | ||
|
||
== dfx canister set-controller | ||
|
||
Use the `+dfx canister set-controller+` command to specify the identity name or principal to use as the new **controller** for a specified canister on the Internet Computer network. | ||
A controller identity has special rights to manage the canister it controls. | ||
For example, only a controlling identity can be used to upgrade or transfer cycles to the canister under its control. | ||
|
||
Note that you can specify either a user identity or a canister as a controller. | ||
You can also specify the controller identity by using its name or its principal. | ||
|
||
=== Basic usage | ||
|
||
[source,bash] | ||
---- | ||
dfx canister set-controller [flag] _canister_ _new-controller_ | ||
---- | ||
|
||
=== Flags | ||
|
||
You can use the following optional flags with the `+dfx canister set-controller+` command. | ||
|
||
[width="100%",cols="<31%,<69%",options="header"] | ||
|=== | ||
|Flag |Description | ||
|
||
|`+-h+`, `+--help+` |Displays usage information. | ||
|
||
|`+-V+`, `+--version+` |Displays version information. | ||
|=== | ||
|
||
=== Arguments | ||
|
||
You must use the following arguments with the `+dfx canister set-controller+` command. | ||
|
||
[width="100%",cols="<31%,<69%",options="header"] | ||
|=== | ||
|Argument |Description | ||
|
||
|`+<canister>+` |Specifies the canister name or canister identifier to be controlled by the identity you specify using the _new_controller_ argument. | ||
|
||
|`+<new_controller>+` |Specifies the identity name or principal of the controller. | ||
|=== | ||
|
||
=== Examples | ||
|
||
You can use the `+dfx canister set-controller+` command to specify a user or canister as the controlling identity for a specific canister. | ||
|
||
For example, you might create a new identity called `+pubsadmin+` then run the `+dfx canister set-controller+` to specify that you want the `+pubsadmin+` identity to be the controller of the `+my_wallet+` canister by running the following commands: | ||
|
||
.... | ||
dfx identity new pubsadmin | ||
dfx canister set-controller my_wallet pubsadmin | ||
.... | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the discussion we had in the architecture meeting, you would not need to do set controller on the wallet canister. The get-principal command will be sent to the Onboarding team and they will set the controller to the user provided principal. |
||
== dfx canister start | ||
|
||
Use the `+dfx canister start+` command to restart a stopped canister on the local Internet Computer network or on a remote Internet Computer network. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true but you can also specify a
custodian
in the wallet canister so multiple identities can transfer cycles to it. Therefore, I would just remove this and just specify that only the controller may install, reinstall, upgrade etc.