Skip to content

Commit 23c5217

Browse files
committed
feat(config): add optional tx_gas_buffer parameter to NetworkConfig
1 parent eb13924 commit 23c5217

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/config/src/network.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pub struct NetworkConfig {
1313
pub router_address: FixedBytes<20>,
1414
#[serde(default = "default_should_write")]
1515
pub should_write: bool,
16+
#[serde(default = "default_tx_gas_buffer")]
17+
pub tx_gas_buffer: u16,
1618
}
1719

1820
#[serde_as]
@@ -26,6 +28,11 @@ fn default_should_write() -> bool {
2628
false
2729
}
2830

31+
/// 20 percent extra gas to the limit by default
32+
fn default_tx_gas_buffer() -> u16 {
33+
120
34+
}
35+
2936
#[cfg(test)]
3037
mod tests {
3138
use super::*;

0 commit comments

Comments
 (0)