mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: op-reth (#4377)
Co-authored-by: Roberto Bayardo <bayardo@alum.mit.edu> Co-authored-by: refcell.eth <abigger87@gmail.com> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> Co-authored-by: refcell <refcell@oplabs.co> Co-authored-by: nicolas <48695862+merklefruit@users.noreply.github.com>
This commit is contained in:
@ -55,6 +55,7 @@ proptest-derive.workspace = true
|
||||
default = ["serde"]
|
||||
serde = ["dep:serde"]
|
||||
arbitrary = ["reth-primitives/arbitrary", "dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
|
||||
optimism = ["reth-primitives/optimism"]
|
||||
|
||||
[[test]]
|
||||
name = "fuzz_roundtrip"
|
||||
|
||||
@ -48,6 +48,8 @@ mod test {
|
||||
success: false,
|
||||
cumulative_gas_used: 0,
|
||||
logs: vec![],
|
||||
#[cfg(feature = "optimism")]
|
||||
deposit_nonce: None,
|
||||
},
|
||||
bloom: Default::default(),
|
||||
}]]);
|
||||
@ -101,10 +103,10 @@ mod test {
|
||||
let mut data = vec![];
|
||||
let request = RequestPair::<Receipts> {
|
||||
request_id: 1111,
|
||||
message: Receipts(vec![
|
||||
vec![
|
||||
ReceiptWithBloom {
|
||||
receipt: Receipt {tx_type: TxType::Legacy,
|
||||
message: Receipts(vec![vec![
|
||||
ReceiptWithBloom {
|
||||
receipt: Receipt {
|
||||
tx_type: TxType::Legacy,
|
||||
cumulative_gas_used: 0x1u64,
|
||||
logs: vec![
|
||||
Log {
|
||||
@ -117,10 +119,12 @@ mod test {
|
||||
},
|
||||
],
|
||||
success: false,
|
||||
},bloom: hex!("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000").into(),
|
||||
}
|
||||
],
|
||||
]),
|
||||
#[cfg(feature = "optimism")]
|
||||
deposit_nonce: None,
|
||||
},
|
||||
bloom: hex!("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000").into(),
|
||||
},
|
||||
]]),
|
||||
};
|
||||
request.encode(&mut data);
|
||||
assert_eq!(data, expected);
|
||||
@ -152,6 +156,8 @@ mod test {
|
||||
},
|
||||
],
|
||||
success: false,
|
||||
#[cfg(feature = "optimism")]
|
||||
deposit_nonce: None,
|
||||
},
|
||||
bloom: hex!("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000").into(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user