.iter()?
{
let entry = result?;
let sequence_number = entry.0.value();
let entry = InscriptionEntry::load(entry.1.value());
let satpoint = SatPoint::load(
*sequence_number_to_satpoint
.get(sequence_number)?
.unwrap()
.value(),
);
write!(
writer,
"{}\t{}\t{}",
entry.inscription_number, entry.id, satpoint
)?;
if include_addresses {
let address = if satpoint.outpoint == unbound_outpoint() {
"unbound".to_string()
} else {
let output = self
.get_transaction(satpoint.outpoint.txid)?
.unwrap()
.output
.into_iter()
.nth(satpoint.outpoint.vout.try_into().unwrap())
.unwrap();
self
.options
.chain()
.address_from_script(&output.script_pubkey)
.map(|address| address.to_string())
.unwrap_or_else(|e| e.to_string())
};
write!(writer, "\t{}", address)?;