Skip to content

Commit

Permalink
Code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
koxu1996 committed Jul 23, 2024
1 parent bf5e6c5 commit 7e7760b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 6 additions & 10 deletions kairos-cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,12 @@ pub fn deposit(
"recipient" => recipient
},
);
let deploy = DeployBuilder::new(
chain_name,
deposit_session,
depositor_secret_key,
)
.with_standard_payment(MAX_GAS_FEE_PAYMENT_AMOUNT) // max amount allowed to be used on gas fees
.with_timestamp(Timestamp::now())
.with_ttl(TimeDiff::from_millis(60_000)) // 1 min
.build()
.map_err(|err| KairosClientError::CasperClientError(err.to_string()))?;
let deploy = DeployBuilder::new(chain_name, deposit_session, depositor_secret_key)
.with_standard_payment(MAX_GAS_FEE_PAYMENT_AMOUNT) // max amount allowed to be used on gas fees
.with_timestamp(Timestamp::now())
.with_ttl(TimeDiff::from_millis(60_000)) // 1 min
.build()
.map_err(|err| KairosClientError::CasperClientError(err.to_string()))?;

let response = reqwest::blocking::Client::new()
.post(base_url.join(DepositPath::PATH).unwrap())
Expand Down
4 changes: 3 additions & 1 deletion kairos-cli/src/commands/deposit.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::client;
use crate::common::args::{AmountArg, ChainNameArg, ContractHashArg, PrivateKeyPathArg, RecipientArg};
use crate::common::args::{
AmountArg, ChainNameArg, ContractHashArg, PrivateKeyPathArg, RecipientArg,
};
use crate::error::CliError;

use casper_client_types::{crypto::SecretKey, ContractHash};
Expand Down
7 changes: 6 additions & 1 deletion kairos-cli/src/common/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ impl TryFrom<RecipientArg> for casper_client_types::PublicKey {

#[derive(Args, Debug)]
pub struct ChainNameArg {
#[arg(id = "chain-name", long, value_name = "NAME", help="Name of the chain, to avoid the deploy from being accidentally included in a different chain")]
#[arg(
id = "chain-name",
long,
value_name = "NAME",
help = "Name of the chain, to avoid the deploy from being accidentally included in a different chain"
)]
pub field: Option<String>,
}

0 comments on commit 7e7760b

Please sign in to comment.