chore: fmt / clippy
This commit is contained in:
parent
d47e34dc5b
commit
74bf6fbb04
|
@ -8,7 +8,7 @@ use std::{
|
||||||
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
|
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
|
||||||
fs,
|
fs,
|
||||||
io::Write,
|
io::Write,
|
||||||
path::{Path, PathBuf},
|
path::Path,
|
||||||
};
|
};
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,8 @@ async fn main() -> Result<()> {
|
||||||
let last_block = client.get_block(BlockNumber::Latest).await?.unwrap().number.unwrap();
|
let last_block = client.get_block(BlockNumber::Latest).await?.unwrap().number.unwrap();
|
||||||
println!("last_block: {last_block}");
|
println!("last_block: {last_block}");
|
||||||
|
|
||||||
let erc20_transfer_filter = Filter::new()
|
let erc20_transfer_filter =
|
||||||
.from_block(last_block - 10000)
|
Filter::new().from_block(last_block - 10000).event("Transfer(address,address,uint256)");
|
||||||
.event("Transfer(address,address,uint256)");
|
|
||||||
|
|
||||||
let mut stream = client.get_logs_paginated(&erc20_transfer_filter, 10);
|
let mut stream = client.get_logs_paginated(&erc20_transfer_filter, 10);
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,8 @@ async fn main() -> Result<()> {
|
||||||
let last_block = client.get_block(BlockNumber::Latest).await?.unwrap().number.unwrap();
|
let last_block = client.get_block(BlockNumber::Latest).await?.unwrap().number.unwrap();
|
||||||
println!("last_block: {last_block}");
|
println!("last_block: {last_block}");
|
||||||
|
|
||||||
let erc20_transfer_filter = Filter::new()
|
let erc20_transfer_filter =
|
||||||
.from_block(last_block - 25)
|
Filter::new().from_block(last_block - 25).event("Transfer(address,address,uint256)");
|
||||||
.event("Transfer(address,address,uint256)");
|
|
||||||
|
|
||||||
let mut stream = client.subscribe_logs(&erc20_transfer_filter).await?;
|
let mut stream = client.subscribe_logs(&erc20_transfer_filter).await?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue