I know that you can use a LogDecoder
inside FuelCallResponse
when calling smart contracts to decode LogData
receipts (by simply calling response.get_logs()
). But is it possible to do the same when not calling contracts?
For example, I can access LogData
receipts when working on an indexer:
extern crate alloc;
use fuel_indexer_macros::indexer;
use fuel_indexer_plugin::prelude::*;
#[indexer(manifest = "indexer.manifest.yaml")]
pub mod indexer_index_mod {
fn handle_block(block: BlockData) {
let receipts: Vec<Receipt> = block.transactions.iter().flat_map(|tx| tx.receipts.clone()).collect();
for receipt in receipts {
match receipt {
Receipt::LogData { id, ra, rb, ptr, len, digest, data, pc, is } => todo!(),
_ => {}
}
}
}
}
Is there any way I can extract meaningful data from obtained Receipt::LogData
entities?