-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
status: needs discussionRequires team input before implementationRequires team input before implementationtype: featureNew functionalityNew functionality
Description
sync::from_block and historic builders would have the additional optional transaction_index builder function, that would allow devs to specify the exact transaction index in the from_block from which to start streaming.
let mut scanner = EventScannerBuilder::sync()
.from_block(100)
.transaction_index(5)
.connect(provider)
.await?;
// this means: "start streaming from block 100, discarding all logs prior to transaction index 5"
// Historical block range mode
let scanner = EventScannerBuilder::historic()
.from_block(1000)
.transaction_index(15)
.to_block(2000)
.max_block_range(500)
.connect(provider.clone());
// "stream logs from block 1000 to block 2000, discarding all logs prior to transaction index 15"DEFAULT_TRANSACTION_INDEX = 0- if the set transaction index is higher than the number of transactions that the specified block contains, the scanner would skip the whole block completely.
Metadata
Metadata
Assignees
Labels
status: needs discussionRequires team input before implementationRequires team input before implementationtype: featureNew functionalityNew functionality