Skip to content

Commit

Permalink
fix(fortuna): Manual eip1559 as the automatic version buggy (#1604)
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m authored May 24, 2024
1 parent 3674f1c commit 81e5193
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/fortuna/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/fortuna/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fortuna"
version = "5.4.4"
version = "5.4.5"
edition = "2021"

[dependencies]
Expand Down
7 changes: 1 addition & 6 deletions apps/fortuna/src/chain/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,10 @@ impl SignablePythContract {
) -> Result<SignablePythContract> {
let provider = Provider::<Http>::try_from(&chain_config.geth_rpc_addr)?;
let chain_id = provider.get_chainid().await?;
let eip1559_supported = match provider.estimate_eip1559_fees(None).await {
Ok((max_fee, max_priority_fee)) => !max_fee.is_zero() && !max_priority_fee.is_zero(),
Err(_) => false,
};
let gas_oracle = EthProviderOracle::new(provider.clone());
let transformer = LegacyTxTransformer {
use_legacy_tx: !eip1559_supported,
use_legacy_tx: chain_config.legacy_tx,
};

let wallet__ = private_key
.parse::<LocalWallet>()?
.with_chain_id(chain_id.as_u64());
Expand Down
4 changes: 4 additions & 0 deletions apps/fortuna/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ pub struct EthereumConfig {
#[serde(default)]
pub confirmed_block_status: BlockStatus,

/// Use the legacy transaction format (for networks without EIP 1559)
#[serde(default)]
pub legacy_tx: bool,

/// The gas limit to use for entropy callback transactions.
pub gas_limit: u64,
}
Expand Down

0 comments on commit 81e5193

Please sign in to comment.