timestamp,
): InscriptionEntryValue,
) -> Self {
Self {
charms,
fee,
height,
id: InscriptionId::load(id),
inscription_number,
parent,
sat: sat.map(Sat),
sequence_number,
timestamp,
}
}
fn store(self) -> Self::Value {
(
self.charms,
self.fee,
self.height,
self.id.store(),
self.inscription_number,
self.parent,
self.sat.map(Sat::n),
self.sequence_number,
self.timestamp,
)
}
}
pub(crate) type InscriptionIdValue = (u128, u128, u32);
impl Entry for InscriptionId {
type Value = InscriptionIdValue;
fn load(value: Self::Value) -> Self {
let (head, tail, index) = value;
let head_array = head.to_le_bytes();
let tail_array = tail.to_le_bytes();
let array = [
head_array[0],
head_array[1],
head_array[2],
head_array[3],
head_array[4],
head_array[5],
head_array[6],
head_array[7],
head_array[8],
head_array[9],