From 2c5d926ef0de0455ecef553f08ff0df98906b236 Mon Sep 17 00:00:00 2001 From: Julian Popescu Date: Mon, 20 Jun 2022 23:01:21 +0200 Subject: [PATCH 1/2] Use H64 for Block Nonce Signed-off-by: Julian Popescu --- ethers-core/src/types/block.rs | 4 ++-- ethers-core/src/types/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethers-core/src/types/block.rs b/ethers-core/src/types/block.rs index cffee94a3..8a977a1c3 100644 --- a/ethers-core/src/types/block.rs +++ b/ethers-core/src/types/block.rs @@ -1,5 +1,5 @@ // Taken from -use crate::types::{Address, Bloom, Bytes, Transaction, TxHash, H256, U256, U64}; +use crate::types::{Address, Bloom, Bytes, Transaction, TxHash, H256, H64, U256, U64}; use chrono::{DateTime, TimeZone, Utc}; #[cfg(not(feature = "celo"))] use core::cmp::Ordering; @@ -81,7 +81,7 @@ pub struct Block { pub mix_hash: Option, /// Nonce #[cfg(not(feature = "celo"))] - pub nonce: Option, + pub nonce: Option, /// Base fee per unit of gas (if past London) #[serde(rename = "baseFeePerGas")] pub base_fee_per_gas: Option, diff --git a/ethers-core/src/types/mod.rs b/ethers-core/src/types/mod.rs index c24747d6c..e4e6a799d 100644 --- a/ethers-core/src/types/mod.rs +++ b/ethers-core/src/types/mod.rs @@ -5,7 +5,7 @@ pub type Selector = [u8; 4]; /// A transaction Hash pub use ethabi::ethereum_types::H256 as TxHash; -pub use ethabi::ethereum_types::{Address, Bloom, H160, H256, H512, U128, U256, U64}; +pub use ethabi::ethereum_types::{Address, Bloom, H160, H256, H512, H64, U128, U256, U64}; pub mod transaction; pub use transaction::{ From 684e408a62e315f0b8f781be7d4beb1dd54fd6e2 Mon Sep 17 00:00:00 2001 From: Julian Popescu Date: Mon, 20 Jun 2022 23:10:57 +0200 Subject: [PATCH 2/2] Update changelog Signed-off-by: Julian Popescu --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 861e7c0a0..eb2119694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Unreleased +- Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396) - Add `as_*_mut` methods on `TypedTransaction` [#1310](https://github.com/gakonst/ethers-rs/pull/1310) - AWS EIP712 data signing no longer signs with EIP155