浏览代码

fix(fortuna): missed a ! on the logic for eip1559 (#1600)

Amin Moghaddam 1 年之前
父节点
当前提交
12730ca005
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      apps/fortuna/Cargo.lock
  2. 1 1
      apps/fortuna/Cargo.toml
  3. 1 1
      apps/fortuna/src/chain/ethereum.rs
  4. 1 1
      apps/fortuna/src/state.rs

+ 1 - 1
apps/fortuna/Cargo.lock

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

+ 1 - 1
apps/fortuna/Cargo.toml

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

+ 1 - 1
apps/fortuna/src/chain/ethereum.rs

@@ -102,7 +102,7 @@ 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 = provider
+        let eip1559_supported = !provider
             .get_block(ethers::prelude::BlockNumber::Latest)
             .await?
             .ok_or_else(|| anyhow!("Latest block not found"))?

+ 1 - 1
apps/fortuna/src/state.rs

@@ -42,7 +42,7 @@ impl PebbleHashChain {
         chain_length: u64,
     ) -> Result<Self> {
         let mut input: Vec<u8> = vec![];
-        input.extend_from_slice(&hex::decode(secret)?);
+        input.extend_from_slice(&hex::decode(secret.trim())?);
         input.extend_from_slice(&chain_id.as_bytes());
         input.extend_from_slice(&provider_address.as_bytes());
         input.extend_from_slice(&contract_address.as_bytes());