evmlib/transaction_config.rs
1// Copyright 2025 MaidSafe.net limited.
2//
3// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3.
4// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed
5// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
6// KIND, either express or implied. Please review the Licences for the specific language governing
7// permissions and limitations relating to use of the SAFE Network Software.
8
9#[derive(Clone, Debug, Default)]
10pub struct TransactionConfig {
11 pub max_fee_per_gas: MaxFeePerGas,
12}
13
14#[derive(Clone, Debug, Default)]
15pub enum MaxFeePerGas {
16 /// Use the current market price for fee per gas. WARNING: This can result in unexpected high gas fees!
17 #[default]
18 Auto,
19 /// Use the current market price for fee per gas, but with an upper limit.
20 LimitedAuto(u128),
21 /// Use no max fee per gas. WARNING: This can result in unexpected high gas fees!
22 Unlimited,
23 /// Use a custom max fee per gas in WEI.
24 Custom(u128),
25}