From ec379da5273840e4eae203f55bbc0c4edc924b8a Mon Sep 17 00:00:00 2001 From: Julian Popescu Date: Thu, 23 Jun 2022 17:02:29 +0200 Subject: [PATCH] Use H64 for Block Nonce (#1396) * Use H64 for Block Nonce Signed-off-by: Julian Popescu * Update changelog Signed-off-by: Julian Popescu --- CHANGELOG.md | 1 + ethers-core/src/types/block.rs | 4 ++-- ethers-core/src/types/mod.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 861e7c0a..eb211969 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 diff --git a/ethers-core/src/types/block.rs b/ethers-core/src/types/block.rs index cffee94a..8a977a1c 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 c24747d6..e4e6a799 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::{