Skip to content

Commit

Permalink
rusk-wallet: Change default gas
Browse files Browse the repository at this point in the history
Rename nonce
  • Loading branch information
Daksh14 committed Oct 10, 2024
1 parent c883734 commit 1492564
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions rusk-wallet/src/bin/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ pub(crate) enum Command {
amt: Dusk,

/// Max amount of gas for this transaction
#[clap(short = 'l', long, default_value_t = DEFAULT_LIMIT_TRANSFER)]
#[clap(short = 'l', long, default_value_t = DEFAULT_LIMIT_CALL)]
gas_limit: u64,

/// Price you're going to pay for each gas unit (in LUX)
Expand Down Expand Up @@ -455,7 +455,7 @@ pub(crate) enum Command {
amt: Dusk,

/// Max amount of gas for this transaction
#[clap(short = 'l', long, default_value_t = DEFAULT_LIMIT_TRANSFER)]
#[clap(short = 'l', long, default_value_t = DEFAULT_LIMIT_CALL)]
gas_limit: u64,

/// Price you're going to pay for each gas unit (in LUX)
Expand Down
8 changes: 2 additions & 6 deletions rusk-wallet/src/bin/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,19 +498,15 @@ fn menu_op(
AddrOp::Run(Box::new(Command::MoonlightToPhoenix {
addr_idx: Some(addr_idx),
amt: prompt::request_token_amt("convert", moonlight_balance)?,
gas_limit: prompt::request_gas_limit(
gas::DEFAULT_LIMIT_TRANSFER,
)?,
gas_limit: prompt::request_gas_limit(gas::DEFAULT_LIMIT_CALL)?,
gas_price: prompt::request_gas_price()?,
}))
}
CMI::PhoenixToMoonlight => {
AddrOp::Run(Box::new(Command::PhoenixToMoonlight {
addr_idx: Some(addr_idx),
amt: prompt::request_token_amt("convert", phoenix_balance)?,
gas_limit: prompt::request_gas_limit(
gas::DEFAULT_LIMIT_TRANSFER,
)?,
gas_limit: prompt::request_gas_limit(gas::DEFAULT_LIMIT_CALL)?,
gas_price: prompt::request_gas_price()?,
}))
}
Expand Down
4 changes: 2 additions & 2 deletions rusk-wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
let state = self.state()?;

let pk = self.bls_pk(sender_idx)?;
let nonce = state.fetch_account(pk).await?.nonce + 1;
let moonlight_nonce = state.fetch_account(pk).await?.nonce + 1;
let chain_id = state.fetch_chain_id().await?;

let mut sender_sk = self.derive_bls_sk(sender_idx);
Expand All @@ -985,7 +985,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
init_args,
gas.limit,
gas.price,
nonce,
moonlight_nonce,
deploy_nonce,
chain_id,
)?;
Expand Down

0 comments on commit 1492564

Please sign in to comment.