Use H64 for Block Nonce (#1396)

* Use H64 for Block Nonce

Signed-off-by: Julian Popescu <hi@julian.dev>

* Update changelog

Signed-off-by: Julian Popescu <hi@julian.dev>
This commit is contained in:
Julian Popescu 2022-06-23 17:02:29 +02:00 committed by GitHub
parent 2524663674
commit ec379da527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@
### Unreleased ### Unreleased
- Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396)
- Add `as_*_mut` methods on `TypedTransaction` - Add `as_*_mut` methods on `TypedTransaction`
[#1310](https://github.com/gakonst/ethers-rs/pull/1310) [#1310](https://github.com/gakonst/ethers-rs/pull/1310)
- AWS EIP712 data signing no longer signs with EIP155 - AWS EIP712 data signing no longer signs with EIP155

View File

@ -1,5 +1,5 @@
// Taken from <https://github.com/tomusdrw/rust-web3/blob/master/src/types/block.rs> // Taken from <https://github.com/tomusdrw/rust-web3/blob/master/src/types/block.rs>
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}; use chrono::{DateTime, TimeZone, Utc};
#[cfg(not(feature = "celo"))] #[cfg(not(feature = "celo"))]
use core::cmp::Ordering; use core::cmp::Ordering;
@ -81,7 +81,7 @@ pub struct Block<TX> {
pub mix_hash: Option<H256>, pub mix_hash: Option<H256>,
/// Nonce /// Nonce
#[cfg(not(feature = "celo"))] #[cfg(not(feature = "celo"))]
pub nonce: Option<U64>, pub nonce: Option<H64>,
/// Base fee per unit of gas (if past London) /// Base fee per unit of gas (if past London)
#[serde(rename = "baseFeePerGas")] #[serde(rename = "baseFeePerGas")]
pub base_fee_per_gas: Option<U256>, pub base_fee_per_gas: Option<U256>,

View File

@ -5,7 +5,7 @@ pub type Selector = [u8; 4];
/// A transaction Hash /// A transaction Hash
pub use ethabi::ethereum_types::H256 as TxHash; 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 mod transaction;
pub use transaction::{ pub use transaction::{