Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
608f35a
feat: remove error in type.rs
LeoPatOZ Nov 19, 2025
f0a8371
feat: remove error type - start fixing block range scanner
LeoPatOZ Nov 19, 2025
ccd8a65
feat: update event_scanner to use Result<BlockRangeScanner, ScannerEr…
LeoPatOZ Nov 19, 2025
4f01e3e
feat: update macro and add try_stream_err
LeoPatOZ Nov 20, 2025
ee05db9
feat: make event scanner return result stream
LeoPatOZ Nov 20, 2025
89b449f
feat: update common fn
LeoPatOZ Nov 20, 2025
e3bd76d
feat: update examples to use result
LeoPatOZ Nov 20, 2025
e5871a7
doc: update to use result
LeoPatOZ Nov 20, 2025
c538cb3
doc: update to use result
LeoPatOZ Nov 20, 2025
7e8299f
test: update to use result message stream
LeoPatOZ Nov 20, 2025
1ac2c73
ref: doc
LeoPatOZ Nov 20, 2025
e57955f
feat: update macro to use result
LeoPatOZ Nov 20, 2025
e09f138
ref: use more internal fn in common.rs
LeoPatOZ Nov 20, 2025
23e63e7
Merge branch 'main' into remove-scanner-error-enum
LeoPatOZ Nov 20, 2025
873a33c
ref: reorder match in example
LeoPatOZ Nov 20, 2025
54f2268
feat: delete stream err
LeoPatOZ Nov 20, 2025
93b3236
feat: remove need for Message wrapping
LeoPatOZ Nov 20, 2025
fe60984
feat: remove need for scanner from
LeoPatOZ Nov 20, 2025
810461e
Merge branch 'main' into remove-scanner-error-enum
LeoPatOZ Nov 20, 2025
0d3ceaa
fix: merge
LeoPatOZ Nov 20, 2025
1eb52c2
fix: format
LeoPatOZ Nov 20, 2025
b76baca
ref: revert match
LeoPatOZ Nov 21, 2025
cfa0b1a
ref: change name
LeoPatOZ Nov 21, 2025
d1924a3
feat: use type alias for scanner result
LeoPatOZ Nov 21, 2025
a62ba56
ref: add better type alias
LeoPatOZ Nov 21, 2025
2977998
fix: doc
LeoPatOZ Nov 21, 2025
ae5bede
feat: udpate macro and fix doc
LeoPatOZ Nov 21, 2025
cd5dac4
Merge branch 'main' into remove-scanner-error-enum
LeoPatOZ Nov 21, 2025
30b933d
Update src/block_range_scanner.rs
0xNeshi Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/historical_scanning/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ async fn main() -> anyhow::Result<()> {

while let Some(message) = stream.next().await {
match message {
Message::Data(logs) => {
Ok(Message::Data(logs)) => {
for log in logs {
info!("Callback successfully executed with event {:?}", log.inner.data);
}
}
Message::Error(e) => {
error!("Received error: {}", e);
}
Message::Notification(info) => {
Ok(Message::Notification(info)) => {
info!("Received info: {:?}", info);
}
Err(e) => {
error!("Received error: {}", e);
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions examples/latest_events_scanning/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ async fn main() -> anyhow::Result<()> {

while let Some(message) = stream.next().await {
match message {
Message::Data(logs) => {
Ok(Message::Data(logs)) => {
for log in logs {
info!("Received event: {:?}", log.inner.data);
}
}
Message::Error(e) => {
error!("Received error: {}", e);
}
Message::Notification(info) => {
Ok(Message::Notification(info)) => {
info!("Received notification: {:?}", info);
}
Err(e) => {
error!("Received error: {}", e);
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions examples/live_scanning/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ async fn main() -> anyhow::Result<()> {

while let Some(message) = stream.next().await {
match message {
Message::Data(logs) => {
Ok(Message::Data(logs)) => {
for log in logs {
info!("Callback successfully executed with event {:?}", log.inner.data);
}
}
Message::Error(e) => {
error!("Received error: {}", e);
}
Message::Notification(info) => {
Ok(Message::Notification(info)) => {
info!("Received info: {:?}", info);
}
Err(e) => {
error!("Received error: {}", e);
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions examples/sync_from_block_scanning/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async fn main() -> anyhow::Result<()> {

while let Some(message) = stream.next().await {
match message {
Message::Data(logs) => {
Ok(Message::Data(logs)) => {
for log in logs {
let Counter::CountIncreased { newCount } = log.log_decode().unwrap().inner.data;
if newCount <= 3 {
Expand All @@ -98,12 +98,12 @@ async fn main() -> anyhow::Result<()> {
}
}
}
Message::Error(e) => {
error!("Received error: {}", e);
}
Message::Notification(info) => {
Ok(Message::Notification(info)) => {
info!("Received notification: {:?}", info);
}
Err(e) => {
error!("Received error: {}", e);
}
}

if historical_processed && live_processed {
Expand Down
10 changes: 5 additions & 5 deletions examples/sync_from_latest_scanning/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ async fn main() -> anyhow::Result<()> {
// only the last 5 events will be streamed before switching to live mode
while let Some(message) = stream.next().await {
match message {
Message::Data(logs) => {
Ok(Message::Data(logs)) => {
for log in logs {
info!("Callback successfully executed with event {:?}", log.inner.data);
}
}
Message::Error(e) => {
error!("Received error: {}", e);
}
Message::Notification(info) => {
Ok(Message::Notification(info)) => {
info!("Received info: {:?}", info);
}
Err(e) => {
error!("Received error: {}", e);
}
}
}

Expand Down
Loading