A first version is already there, but it's not working properly. I'm actually unsure if bloom filters have a 100% search guarantee.
let payment_factory_address = app
.config
.deposit_factory_contract
.context("A deposit_contract must be provided in the config to parse payments")?;
let payment_factory_contract =
PaymentFactory::new(payment_factory_address, app.internal_provider().clone());
// check bloom filter to be sure this transaction contains any relevant logs
if let Some(ValueOrArray::Value(Some(x))) = payment_factory_contract
.payment_received_filter()
.filter
.topics[0]
{
let bloom_input = BloomInput::Hash(x.as_fixed_bytes());
// do a quick check that this transaction contains the required log
if !transaction_receipt.logs_bloom.contains_input(bloom_input) {
return Err(Web3ProxyError::BadRequest("no matching logs found".into()));
}
}
A first version is already there, but it's not working properly. I'm actually unsure if bloom filters have a 100% search guarantee.