Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --gas-limit parameter #200

Merged
merged 1 commit into from
Nov 19, 2024
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
14 changes: 0 additions & 14 deletions lib/cli/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -615,7 +614,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -695,7 +693,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -764,7 +761,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -850,7 +846,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -944,7 +939,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1004,7 +998,6 @@ mod transaction {
additional_computation_factor: "",
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1068,7 +1061,6 @@ mod transaction {
additional_computation_factor: "",
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1130,7 +1122,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1190,7 +1181,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1257,7 +1247,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1323,7 +1312,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1366,7 +1354,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down Expand Up @@ -1404,7 +1391,6 @@ mod transaction {
receipt: SAMPLE_DIGEST,
standard_payment: "true",
transferred_value: "0",
gas_limit: "",
session_entry_point: None,
chunked_args: None,
};
Expand Down
2 changes: 0 additions & 2 deletions lib/cli/transaction_str_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ pub struct TransactionStrParams<'a> {
pub receipt: &'a str,
/// Standard payment.
pub standard_payment: &'a str,
/// Gas limit for the transaction.
pub gas_limit: &'a str,
/// Transaferred value.
pub transferred_value: &'a str,
/// The entry point for the session.
Expand Down
33 changes: 0 additions & 33 deletions src/transaction/creation_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,35 +441,6 @@ pub(super) mod gas_price_tolerance {
}
}

pub(super) mod gas_limit {
use super::*;
pub(in crate::transaction) const ARG_NAME: &str = "gas-limit";

const ARG_VALUE_NAME: &str = common::ARG_INTEGER;

const ARG_ALIAS: &str = "gas-limit";
const ARG_SHORT: char = 'l';
const ARG_HELP: &str =
"The maximum amount of gas the user is willing to pay for the transaction";

pub(in crate::transaction) fn arg() -> Arg {
Arg::new(ARG_NAME)
.long(ARG_NAME)
.alias(ARG_ALIAS)
.short(ARG_SHORT)
.required(true)
.value_name(ARG_VALUE_NAME)
.help(ARG_HELP)
.display_order(DisplayOrder::GasPriceTolerance as usize)
}

pub fn get(matches: &ArgMatches) -> &str {
matches
.get_one::<String>(ARG_NAME)
.map(String::as_str)
.unwrap_or_default()
}
}
pub(super) mod transfer_amount {
use super::*;
pub(in crate::transaction) const ARG_NAME: &str = "transfer-amount";
Expand Down Expand Up @@ -1659,7 +1630,6 @@ pub(super) mod invocable_entity {
.arg(entity_addr::arg())
.arg(session_entry_point::arg())
.arg(transaction_runtime::arg())
.arg(gas_limit::arg())
.arg(transferred_value::arg())
.arg(chunked_args::arg())
}
Expand Down Expand Up @@ -1911,7 +1881,6 @@ pub(super) mod session {
DisplayOrder::IsInstallUpgrade as usize,
))
.arg(transaction_runtime::arg())
.arg(gas_limit::arg())
.arg(transferred_value::arg())
.arg(chunked_args::arg())
}
Expand Down Expand Up @@ -2095,7 +2064,6 @@ pub(super) fn build_transaction_str_params(
let payment_amount = payment_amount::get(matches);
let receipt = receipt::get(matches);
let standard_payment = standard_payment::get(matches);
let gas_limit = gas_limit::get(matches);

let maybe_output_path = output::get(matches).unwrap_or_default();
let initiator_addr = initiator_address::get(matches);
Expand Down Expand Up @@ -2123,7 +2091,6 @@ pub(super) fn build_transaction_str_params(
transferred_value: transferred_value::get(matches)
.map(|tv| tv.as_str())
.unwrap_or_default(),
gas_limit,
session_entry_point,
chunked_args,
}
Expand Down
Loading