let transport = web3::transports::Http::new("https://api.avax.network/ext/bc/C/rpc").unwrap();
let web3 = web3::Web3::new(transport);
let joe_factory = Address::from_str("0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10").unwrap();
let topic0 = H256::from_str("3c9197f003de7af2c0cf504753f234213235a2d3ff79e03bdef95adc70104258").unwrap();
println!("{:?}", H256::from_str("0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9").unwrap());
let pair_event_filter = FilterBuilder::default()
.address(vec![joe_factory])
//.from_block(BlockNumber::Number(U64::from_str("11275746").unwrap()))
.from_block(BlockNumber::Latest)
.topics(Some(vec![H256::from_str("0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9").unwrap()]),
None,
None,
None,)
.build();
let filter = web3.eth_filter().create_logs_filter(pair_event_filter).await.unwrap();
let logs_stream = filter.stream(std::time::Duration::from_secs(1));
futures::pin_mut!(logs_stream);
let log = logs_stream.next().await.unwrap();
println!("got log: {:?}", log);
Using the same topic0, address and blocknumbers(in different combinations of from/to or none at all) I get Err(Rpc(Error { code: ServerError(-32000), message: "filter not found", data: None })) on web3 vs an actual result on snowtrace's api, where am I going wrong?
Can someone help me find my mistake?
Using the same topic0, address and blocknumbers(in different combinations of from/to or none at all) I get
Err(Rpc(Error { code: ServerError(-32000), message: "filter not found", data: None }))
on web3 vs an actual result on snowtrace's api, where am I going wrong?