mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: improve exex examples' validation (#8116)
This commit is contained in:
@ -243,10 +243,14 @@ fn decode_chain_into_rollup_events(
|
||||
.zip(receipts.iter().flatten())
|
||||
.map(move |(tx, receipt)| (block, tx, receipt))
|
||||
})
|
||||
// Filter only transactions to the rollup contract
|
||||
.filter(|(_, tx, _)| tx.to() == Some(ROLLUP_CONTRACT_ADDRESS))
|
||||
// Get all logs
|
||||
.flat_map(|(block, tx, receipt)| receipt.logs.iter().map(move |log| (block, tx, log)))
|
||||
// Get all logs from rollup contract
|
||||
.flat_map(|(block, tx, receipt)| {
|
||||
receipt
|
||||
.logs
|
||||
.iter()
|
||||
.filter(|log| log.address == ROLLUP_CONTRACT_ADDRESS)
|
||||
.map(move |log| (block, tx, log))
|
||||
})
|
||||
// Decode and filter rollup events
|
||||
.filter_map(|(block, tx, log)| {
|
||||
RollupContractEvents::decode_raw_log(log.topics(), &log.data.data, true)
|
||||
|
||||
Reference in New Issue
Block a user