From 19434a2cd2904426237fdf7011b7a2f35a4f51fa Mon Sep 17 00:00:00 2001 From: Doris Benda Date: Tue, 17 Oct 2023 14:24:23 +0300 Subject: [PATCH] Update comments --- templates/default/deploy-scripts/Cargo.toml | 8 +------- templates/default/deploy-scripts/src/deployer.rs | 12 ++++++------ templates/default/deploy-scripts/src/main.rs | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/templates/default/deploy-scripts/Cargo.toml b/templates/default/deploy-scripts/Cargo.toml index 3ba8a056..50d4df9a 100644 --- a/templates/default/deploy-scripts/Cargo.toml +++ b/templates/default/deploy-scripts/Cargo.toml @@ -8,14 +8,8 @@ version = "1.0.0" [dependencies] anyhow = "1.0" chrono = "0.4.26" -hex = "0.4" -reqwest = {version = "0.11", features = ["json"]} -serde = "1.0" -serde_json = "1.0" -sha2 = "0.10" -thiserror = "1.0" tokio = {version = "1.18", features = ["rt", "macros", "rt-multi-thread"] } clap = { version = "4", features = ["derive", "env"]} concordium-rust-sdk="2.4" itertools = "0.11.0" -default = {path = "../"} +{{crate_name}} = {path = "../"} diff --git a/templates/default/deploy-scripts/src/deployer.rs b/templates/default/deploy-scripts/src/deployer.rs index a9834dac..5b9abd5c 100644 --- a/templates/default/deploy-scripts/src/deployer.rs +++ b/templates/default/deploy-scripts/src/deployer.rs @@ -61,11 +61,11 @@ impl Deployer { /// A function to deploy a wasm module on the chain. /// - /// If successful, the transaction hash and - /// the module reference is returned. + /// If successful, the transaction hash, the block item, and + /// the module reference are returned. /// If the module already exists on /// chain, this function returns the module reference of the already - /// deployed module instead. + /// deployed module (no transaction hash or the block item returned). /// /// An optional expiry time for the transaction /// can be given. If `None` is provided, the local time + 300 seconds is @@ -133,7 +133,7 @@ impl Deployer { /// A function to initialize a smart contract instance on the chain. /// - /// If successful, the transaction hash and the contract address is + /// If successful, the transaction hash, the block item, and the contract address are /// returned. /// /// An optional energy for the transaction can be given. If `None` is @@ -190,7 +190,7 @@ impl Deployer { /// A function to update a smart contract instance on the chain. /// /// If successful, the transaction - /// hash is returned. + /// hash, and the block item are returned. /// /// An optional energy for the transaction can be /// given. If `None` is provided, 50000 energy is used as a default energy @@ -278,7 +278,7 @@ impl Deployer { } } - /// A function to get the current nonce of the wallet account. + /// A function to get the next nonce of the wallet account. pub async fn get_nonce( &mut self, address: AccountAddress, diff --git a/templates/default/deploy-scripts/src/main.rs b/templates/default/deploy-scripts/src/main.rs index 045e3480..b9c57f14 100644 --- a/templates/default/deploy-scripts/src/main.rs +++ b/templates/default/deploy-scripts/src/main.rs @@ -1,5 +1,5 @@ pub mod deployer; -use anyhow::{Error,Context}; +use anyhow::{Context, Error}; use clap::Parser; use concordium_rust_sdk::{ common::types::Amount, @@ -8,7 +8,7 @@ use concordium_rust_sdk::{ types::{OwnedContractName, OwnedParameter, OwnedReceiveName}, }, types::{ - smart_contracts::{ ModuleReference, WasmModule}, + smart_contracts::{ModuleReference, WasmModule}, transactions, transactions::send::GivenEnergy, },