make_deploy

Function make_deploy 

Source
pub fn make_deploy(
    maybe_output_path: &str,
    deploy_params: DeployStrParams<'_>,
    session_params: SessionStrParams<'_>,
    payment_params: PaymentStrParams<'_>,
    force: bool,
) -> Result<Deploy, CliError>
Expand description

Returns a Deploy and outputs it to a file or stdout if the std-fs-io feature is enabled.

As a file, the Deploy can subsequently be signed by other parties using sign_deploy_file and then sent to the network for execution using send_deploy_file.

If the std-fs-io feature is NOT enabled, maybe_output_path and force are ignored. Otherwise, maybe_output_path specifies the output file path, or if empty, will print it to stdout. If force is true, and a file exists at maybe_output_path, it will be overwritten. If force is false and a file exists at maybe_output_path, crate::Error::FileAlreadyExists is returned and the file will not be written.