Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
420 changes: 200 additions & 220 deletions docs/cli-reference/dfx-canister.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/cli-reference/dfx-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ You can use the following options with the `dfx canister call` command.

|Option |Description|
--------|------------|
|`--network <network>` |Specifies the environment (e.g., {platform} or testnet) of the controller you want to add.
|`--network <network>` |Specifies the environment (e.g., Internet Computer or testnet) of the controller you want to add.

### Arguments

Expand Down
5 changes: 3 additions & 2 deletions src/dfx/src/commands/canister/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct CanisterCallOpts {
#[clap(long)]
r#async: bool,

/// Sends a query request to a canister.
/// Sends a query request to a canister instead of an update request.
#[clap(long, conflicts_with("async"))]
query: bool,

Expand All @@ -51,7 +51,7 @@ pub struct CanisterCallOpts {
#[clap(conflicts_with("random"))]
argument: Option<String>,

/// Specifies the config for generating random argument.
/// Specifies the config for generating random arguments.
#[clap(long, conflicts_with("argument"))]
random: Option<String>,

Expand All @@ -66,6 +66,7 @@ pub struct CanisterCallOpts {

/// Specifies the amount of cycles to send on the call.
/// Deducted from the wallet.
/// Requires --wallet as a flag to `dfx canister`.
#[clap(long, validator(cycle_amount_validator))]
with_cycles: Option<String>,

Expand Down
5 changes: 2 additions & 3 deletions src/dfx/src/commands/canister/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ use ic_agent::Identity as _;
use ic_types::principal::Principal as CanisterId;
use slog::info;

/// Creates an empty canister on the Internet Computer and
/// associates the Internet Computer assigned Canister ID to the canister name.
/// Creates an empty canister and associates the assigned Canister ID to the canister name.
#[derive(Parser)]
pub struct CanisterCreateOpts {
/// Specifies the canister name. Either this or the --all flag are required.
Expand All @@ -46,7 +45,7 @@ pub struct CanisterCreateOpts {
compute_allocation: Option<String>,

/// Specifies how much memory the canister is allowed to use in total.
/// This should be a value in the range [0..12 GiB]
/// This should be a value in the range [0..12 GiB].
/// A setting of 0 means the canister will have access to memory on a “best-effort” basis:
/// It will only be charged for the memory it uses, but at any point in time may stop running
/// if it tries to allocate more memory when there isn’t space available on the subnet.
Expand Down
4 changes: 2 additions & 2 deletions src/dfx/src/commands/canister/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DANK_PRINCIPAL: Principal =
const WITHDRAWAL_COST: u128 = 10_000_000_000; // Emperically estimated.
const MAX_MEMORY_ALLOCATION: u64 = 8589934592;

/// Deletes a canister on the Internet Computer network.
/// Deletes a currently stopped canister.
#[derive(Parser)]
pub struct CanisterDeleteOpts {
/// Specifies the name of the canister to delete.
Expand All @@ -51,7 +51,7 @@ pub struct CanisterDeleteOpts {
#[clap(long)]
no_withdrawal: bool,

/// Withdraw cycles from canister(s) to canister/wallet before deleting.
/// Withdraw cycles from canister(s) to the specified canister/wallet before deleting.
#[clap(long, conflicts_with("no-withdrawal"))]
withdraw_cycles_to_canister: Option<String>,

Expand Down
4 changes: 2 additions & 2 deletions src/dfx/src/commands/canister/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use ic_types::Principal;
use serde_cbor::Value;
use std::convert::TryFrom;

/// Get the hash of a canister’s WASM module and its current controller in a certified way.
/// Get the hash of a canister’s WASM module and its current controller.
#[derive(Parser)]
pub struct InfoOpts {
/// Specifies the name or id of the canister to get its certified canister information.
/// Specifies the name or id of the canister to get its canister information.
canister: String,
}

Expand Down
4 changes: 2 additions & 2 deletions src/dfx/src/commands/canister/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::fs;
use std::path::PathBuf;
use std::str::FromStr;

/// Deploys compiled code as a canister on the Internet Computer.
/// Installs compiled code in a canister.
#[derive(Parser, Clone)]
pub struct CanisterInstallOpts {
/// Specifies the canister to deploy. You must specify either canister name/id or the --all option.
Expand Down Expand Up @@ -49,7 +49,7 @@ pub struct CanisterInstallOpts {
#[clap(long, requires("argument"), possible_values(&["idl", "raw"]))]
argument_type: Option<String>,

/// Specifies a particular WASM file to install, bypassing the dfx.json project system.
/// Specifies a particular WASM file to install, bypassing the dfx.json project settings.
#[clap(long, conflicts_with("all"))]
wasm: Option<PathBuf>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/commands/canister/request_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use ic_agent::{AgentError, RequestId};
use ic_types::Principal;
use std::str::FromStr;

/// Requests the status of a specified call from a canister.
/// Requests the status of a call from a canister.
#[derive(Parser)]
pub struct RequestStatusOpts {
/// Specifies the request identifier.
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/commands/canister/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ic_types::Principal;
use std::{fs::File, path::Path};
use std::{io::Read, str::FromStr};

/// Send a signed message
/// Send a previously-signed message.
#[derive(Parser)]
pub struct CanisterSendOpts {
/// Specifies the file name of the message
Expand Down
4 changes: 2 additions & 2 deletions src/dfx/src/commands/canister/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::path::Path;
use std::str::FromStr;
use std::time::SystemTime;

/// Sign a canister call and generate message file in json
/// Sign a canister call and generate message file.
#[derive(Parser)]
pub struct CanisterSignOpts {
/// Specifies the name of the canister to call.
Expand Down Expand Up @@ -54,7 +54,7 @@ pub struct CanisterSignOpts {
#[clap(long, requires("argument"), possible_values(&["idl", "raw"]))]
r#type: Option<String>,

/// Specifies how long will the message be valid in seconds, default to be 300s (5 minutes)
/// Specifies how long the message will be valid in seconds, default to be 300s (5 minutes)
#[clap(long, default_value("5m"))]
expire_after: String,

Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/commands/canister/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ic_types::Principal;
use slog::info;
use std::time::Duration;

/// Starts a canister on the Internet Computer network.
/// Starts a stopped canister.
#[derive(Parser)]
pub struct CanisterStartOpts {
/// Specifies the name or id of the canister to start. You must specify either a canister name/id or the --all flag.
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/commands/canister/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ic_types::Principal;
use slog::info;
use std::time::Duration;

/// Returns the current status of the canister on the Internet Computer network: Running, Stopping, or Stopped.
/// Returns the current status of a canister: Running, Stopping, or Stopped.
#[derive(Parser)]
pub struct CanisterStatusOpts {
/// Specifies the name of the canister to return information for.
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/commands/canister/stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ic_types::Principal;
use slog::info;
use std::time::Duration;

/// Stops a canister that is currently running on the Internet Computer network.
/// Stops a currently running canister.
#[derive(Parser)]
pub struct CanisterStopOpts {
/// Specifies the name or id of the canister to stop.
Expand Down
3 changes: 2 additions & 1 deletion src/dfx/src/commands/canister/uninstall_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use ic_types::Principal;
use slog::info;
use std::time::Duration;

/// Uninstalls a canister, removing its code and state, on the Internet Computer network.
/// Uninstalls a canister, removing its code and state.
/// Does not delete the canister.
#[derive(Parser)]
pub struct UninstallCodeOpts {
/// Specifies the name or id of the canister to uinstall.
Expand Down
2 changes: 2 additions & 0 deletions src/dfx/src/commands/canister/update_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ pub struct UpdateSettingsOpts {
#[clap(long, multiple_occurrences(true))]
controller: Option<Vec<String>>,

/// Add a principal to the list of controllers of the canister.
#[clap(long, multiple_occurrences(true), conflicts_with("controller"))]
add_controller: Option<Vec<String>>,

/// Removes a principal from the list of controllers of the canister.
#[clap(long, multiple_occurrences(true), conflicts_with("controller"))]
remove_controller: Option<Vec<String>>,

Expand Down