Skip to content

Commit a9046d2

Browse files
devin-ai-integration[bot]Jayant Krishnamurthy
andcommitted
feat: add backoff_gas_multiplier_cap_pct to fortuna config
Co-Authored-By: Jayant Krishnamurthy <[email protected]>
1 parent 2faddf9 commit a9046d2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

apps/fortuna/config.sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ chains:
99
# Increase the transaction gas limit by 10% each time the callback fails
1010
# defaults to 100 (i.e., don't change the gas limit) if not specified.
1111
backoff_gas_multiplier_pct: 110
12+
# Maximum percentage that the gas limit can be multiplied by during backoff retries
13+
# defaults to 500 (i.e., up to 5x the original gas limit) if not specified.
14+
backoff_gas_multiplier_cap_pct: 500
1215
min_keeper_balance: 100000000000000000
1316

1417
# Provider configuration

apps/fortuna/src/config.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ pub struct EthereumConfig {
174174
/// The percentage multiplier to apply to the priority fee (100 = no change, e.g. 150 = 150% of base fee)
175175
#[serde(default = "default_priority_fee_multiplier_pct")]
176176
pub priority_fee_multiplier_pct: u64,
177+
178+
/// The maximum percentage that the gas limit can be multiplied by during backoff retries
179+
/// For example, 500 means the gas limit can be increased up to 500% of the original estimate
180+
#[serde(default = "default_backoff_gas_multiplier_cap_pct")]
181+
pub backoff_gas_multiplier_cap_pct: u64,
182+
}
183+
184+
fn default_backoff_gas_multiplier_cap_pct() -> u64 {
185+
500 // Default to 500% (5x) maximum gas multiplier
177186
}
178187

179188
fn default_backoff_gas_multiplier_pct() -> u64 {

0 commit comments

Comments
 (0)