From df708afccc7a2152234aaa80ca2e430083a4e851 Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Thu, 23 May 2024 17:25:24 +0200 Subject: [PATCH] fix(fortuna): Fix eip1559 detection (#1598) --- apps/fortuna/Cargo.lock | 2 +- apps/fortuna/Cargo.toml | 2 +- apps/fortuna/config.sample.yaml | 1 - apps/fortuna/src/chain/ethereum.rs | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/fortuna/Cargo.lock b/apps/fortuna/Cargo.lock index e0e3095d8..6a14c9355 100644 --- a/apps/fortuna/Cargo.lock +++ b/apps/fortuna/Cargo.lock @@ -1488,7 +1488,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "5.4.1" +version = "5.4.2" dependencies = [ "anyhow", "axum", diff --git a/apps/fortuna/Cargo.toml b/apps/fortuna/Cargo.toml index 39bec43b8..be982241a 100644 --- a/apps/fortuna/Cargo.toml +++ b/apps/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "5.4.1" +version = "5.4.2" edition = "2021" [dependencies] diff --git a/apps/fortuna/config.sample.yaml b/apps/fortuna/config.sample.yaml index 3f4bee1b4..d085a48e8 100644 --- a/apps/fortuna/config.sample.yaml +++ b/apps/fortuna/config.sample.yaml @@ -3,5 +3,4 @@ chains: geth_rpc_addr: https://replicator.pegasus.lightlink.io/rpc/v1 contract_addr: 0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a reveal_delay_blocks: 0 - legacy_tx: true gas_limit: 500000 diff --git a/apps/fortuna/src/chain/ethereum.rs b/apps/fortuna/src/chain/ethereum.rs index eec7dda00..76e135108 100644 --- a/apps/fortuna/src/chain/ethereum.rs +++ b/apps/fortuna/src/chain/ethereum.rs @@ -107,7 +107,8 @@ impl SignablePythContract { .await? .ok_or_else(|| anyhow!("Latest block not found"))? .base_fee_per_gas - .is_some(); + .unwrap_or(U256::zero()) + .is_zero(); // sei testnet returns 0 instead of None let gas_oracle = EthProviderOracle::new(provider.clone()); let transformer = LegacyTxTransformer { use_legacy_tx: !eip1559_supported,