Ver Fonte

fix(fortuna): Fix eip1559 detection (#1598)

Amin Moghaddam há 1 ano atrás
pai
commit
df708afccc

+ 1 - 1
apps/fortuna/Cargo.lock

@@ -1488,7 +1488,7 @@ dependencies = [
 
 [[package]]
 name = "fortuna"
-version = "5.4.1"
+version = "5.4.2"
 dependencies = [
  "anyhow",
  "axum",

+ 1 - 1
apps/fortuna/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name    = "fortuna"
-version = "5.4.1"
+version = "5.4.2"
 edition = "2021"
 
 [dependencies]

+ 0 - 1
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

+ 2 - 1
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,