mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-28 08:37:59 -05:00
chore: some no-std touchups (#9480)
This commit is contained in:
@@ -4,6 +4,9 @@ use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
|
||||
use core::mem;
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A transaction with a priority fee ([EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)).
|
||||
#[main_codec]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
|
||||
|
||||
@@ -4,6 +4,9 @@ use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
|
||||
use core::mem;
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Transaction with an [`AccessList`] ([EIP-2930](https://eips.ethereum.org/EIPS/eip-2930)).
|
||||
#[main_codec]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
|
||||
|
||||
@@ -2,8 +2,11 @@ use super::access_list::AccessList;
|
||||
use crate::{keccak256, Bytes, ChainId, Signature, TxKind, TxType, B256, U256};
|
||||
use alloy_eips::eip7702::SignedAuthorization;
|
||||
use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
|
||||
use core::mem;
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
use std::mem;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// [EIP-7702 Set Code Transaction](https://eips.ethereum.org/EIPS/eip-7702)
|
||||
///
|
||||
@@ -306,7 +309,7 @@ impl<'a> arbitrary::Arbitrary<'a> for TxEip7702 {
|
||||
}
|
||||
|
||||
// TODO(onbjerg): This is temporary until we upstream `Hash` for EIP-7702 types in alloy
|
||||
impl std::hash::Hash for TxEip7702 {
|
||||
impl core::hash::Hash for TxEip7702 {
|
||||
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
|
||||
self.chain_id.hash(state);
|
||||
self.nonce.hash(state);
|
||||
|
||||
@@ -3,6 +3,9 @@ use alloy_rlp::{length_of_length, Encodable, Header};
|
||||
use core::mem;
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Legacy transaction.
|
||||
#[main_codec]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
|
||||
|
||||
Reference in New Issue
Block a user