From caa6f0aa198be6c336745e923204ca6cb4da0123 Mon Sep 17 00:00:00 2001 From: Ivan Rozhnovskiy <43208710+VanjaRo@users.noreply.github.com> Date: Tue, 15 Nov 2022 22:34:07 +0300 Subject: [PATCH] fix: updated logs event filtering for examples with new syntax (#1861) --- examples/paginated_logs.rs | 2 +- examples/subscribe_logs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/paginated_logs.rs b/examples/paginated_logs.rs index 9dbe8ae9..0a58a9b8 100644 --- a/examples/paginated_logs.rs +++ b/examples/paginated_logs.rs @@ -14,7 +14,7 @@ async fn main() -> Result<()> { let erc20_transfer_filter = Filter::new() .from_block(last_block - 10000) - .topic0(ValueOrArray::Value(H256::from(keccak256("Transfer(address,address,uint256)")))); + .event("Transfer(address,address,uint256)"); let mut stream = client.get_logs_paginated(&erc20_transfer_filter, 10); diff --git a/examples/subscribe_logs.rs b/examples/subscribe_logs.rs index 02788a9c..c35cd62a 100644 --- a/examples/subscribe_logs.rs +++ b/examples/subscribe_logs.rs @@ -16,7 +16,7 @@ async fn main() -> Result<()> { let erc20_transfer_filter = Filter::new() .from_block(last_block - 25) - .topic0(ValueOrArray::Value(H256::from(keccak256("Transfer(address,address,uint256)")))); + .event("Transfer(address,address,uint256)"); let mut stream = client.subscribe_logs(&erc20_transfer_filter).await?;