Skip to content

Commit 7e18523

Browse files
authored
chore: Bump price for EVM noop transactions (#581)
* chore: Bump price for EVM noop transactions * chore: Test fix
1 parent d8a221a commit 7e18523

File tree

5 files changed

+155
-38
lines changed

5 files changed

+155
-38
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
### 🚀 Features
77

88
* Add AWS KMS Ed25519 support ([#567](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/567)) ([d87d41b](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/d87d41bf4b819ac0bfd2c11dd1e7ac053fd7797f))
9-
* add evm intristic gas_limit validation ([dd1b2d6](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/dd1b2d6768d09f051791d0db68c912a38d273715))
10-
* Pass arbitrary payloads to script exectution ([#312](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/312)) ([adecaf5](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/adecaf5d73c3df9083c6a3fcf62ed669bc90b25c))
9+
* add evm intrinsic gas_limit validation ([dd1b2d6](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/dd1b2d6768d09f051791d0db68c912a38d273715))
10+
* Pass arbitrary payloads to script execution ([#312](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/312)) ([adecaf5](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/adecaf5d73c3df9083c6a3fcf62ed669bc90b25c))
1111
* Stellar sponsored transactions (gas abstraction) ([#563](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/563)) ([9a38990](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/9a3899073cc3a73d6f2c3501b7af572d23cddba7))
1212
* Transactions list endpoint - sort improvements ([#573](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/573)) ([63433ad](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/63433ad71208cbdb6bd1508d7df2c66b6839e81d))
1313
* Update plugin system to support HTTP headers ([#566](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/566)) ([26e66a2](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/26e66a228d155917c87691774c234cbe346d2990))
1414

1515

1616
### 🐛 Bug Fixes
1717

18-
* plat-6480 allow transfering wrapped sol tokens ([#132](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/132)) ([f04e66a](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/f04e66a568c877c2a4c5c5378fb6017c2e41d2c6))
19-
* stellar tx data persistance ([#500](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/500)) ([d60a019](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/d60a01958582aa5ab70b2dc369b1531d493db637))
18+
* plat-6480 allow transferring wrapped sol tokens ([#132](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/132)) ([f04e66a](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/f04e66a568c877c2a4c5c5378fb6017c2e41d2c6))
19+
* stellar tx data persistence ([#500](https://github.com/OpenZeppelin/openzeppelin-relayer/issues/500)) ([d60a019](https://github.com/OpenZeppelin/openzeppelin-relayer/commit/d60a01958582aa5ab70b2dc369b1531d493db637))
2020

2121
## [1.2.0](https://github.com/OpenZeppelin/openzeppelin-relayer/compare/v1.1.0...v1.2.0) (2025-11-11)
2222

src/domain/transaction/evm/evm_transaction.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use tracing::{debug, error, info, warn};
1313
use crate::{
1414
constants::{DEFAULT_EVM_GAS_LIMIT_ESTIMATION, GAS_LIMIT_BUFFER_MULTIPLIER},
1515
domain::{
16+
evm::is_noop,
1617
transaction::{
1718
evm::{ensure_status, ensure_status_one_of, PriceCalculator, PriceCalculatorTrait},
1819
Transaction,
@@ -762,13 +763,13 @@ where
762763
return Ok(tx);
763764
}
764765

766+
let evm_data = tx.network_data.get_evm_transaction_data()?;
767+
765768
// Calculate bumped gas price
769+
// For noop transactions, force_bump=true to skip gas price cap and ensure bump succeeds
766770
let bumped_price_params = self
767771
.price_calculator
768-
.calculate_bumped_gas_price(
769-
&tx.network_data.get_evm_transaction_data()?,
770-
self.relayer(),
771-
)
772+
.calculate_bumped_gas_price(&evm_data, self.relayer(), is_noop(&evm_data))
772773
.await?;
773774

774775
if !bumped_price_params.is_min_bumped.is_some_and(|b| b) {
@@ -780,9 +781,6 @@ where
780781
self.ensure_sufficient_balance(bumped_price_params.total_cost)
781782
.await?;
782783

783-
// Get transaction data
784-
let evm_data = tx.network_data.get_evm_transaction_data()?;
785-
786784
// Create new transaction data with bumped gas price
787785
let updated_evm_data = evm_data.with_price_params(bumped_price_params.clone());
788786

@@ -1128,6 +1126,7 @@ mod tests {
11281126
&self,
11291127
tx: &EvmTransactionData,
11301128
relayer: &RelayerRepoModel,
1129+
force_bump: bool,
11311130
) -> Result<PriceParams, TransactionError>;
11321131
}
11331132
}
@@ -2730,7 +2729,7 @@ mod tests {
27302729
mock_price_calculator
27312730
.expect_calculate_bumped_gas_price()
27322731
.times(1)
2733-
.returning(|_, _| {
2732+
.returning(|_, _, _| {
27342733
Ok(PriceParams {
27352734
gas_price: Some(25000000000), // 25% bump
27362735
max_fee_per_gas: None,
@@ -3099,7 +3098,7 @@ mod tests {
30993098
mock_price_calculator
31003099
.expect_calculate_bumped_gas_price()
31013100
.times(1)
3102-
.returning(|_, _| {
3101+
.returning(|_, _, _| {
31033102
Ok(PriceParams {
31043103
gas_price: Some(25000000000), // 25 Gwei (25% bump)
31053104
max_fee_per_gas: None,

0 commit comments

Comments
 (0)