fix: updated logs event filtering for examples with new syntax (#1861)

This commit is contained in:
Ivan Rozhnovskiy 2022-11-15 22:34:07 +03:00 committed by GitHub
parent 5ae0a848c7
commit caa6f0aa19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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?;