Transaction e99afb8cddd8486c1dc262ac17fdc08419ca48d6f9db694fafd28dd11c89840b
1 Input
-
3a710b595f78cee038d1dafb6f48e6a1e5f2c1b5a92fab6f7485fa34e6d4ee50:0
OP_DATA_32(32) 69a89b36a3dbce47ee067f9142ee5265c1a8e5fea2855bda0dbe6735f63654ddOP_CHECKSIG(172)OP_0(0)OP_IF(99)OP_DATA_3(3) ordOP_DATA_1(1)OP_DATA_24(24) text/plain;charset=utf-8OP_0(0)OP_PUSHDATA2(77) use super::*; #[derive(PartialEq, Debug)] pub(crate) struct Decimal { height: Height, offset: u64, } impl From<Sat> for Decimal { fn from(sat: Sat) -> Self { Self { height: sat.height(), offset: sat.third(), } } } impl Display for Decimal { fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}.{}", self.height, self.offset) } } #[cfg(test)] mod tests { use super::*; #[test] fn decimal() { assert_eq!( Sat(0).decimal(), Decimal { height:OP_PUSHDATA2(77) Height(0), offset: 0 } ); assert_eq!( Sat(1).decimal(), Decimal { height: Height(0), offset: 1 } ); assert_eq!( Sat(2099999997689999).decimal(), Decimal { height: Height(6929999), offset: 0 } ); } }OP_ENDIF(104)
2 Outputs
- e99afb8cddd8486c1dc262ac17fdc08419ca48d6f9db694fafd28dd11c89840b:0
- e99afb8cddd8486c1dc262ac17fdc08419ca48d6f9db694fafd28dd11c89840b:1
value 546
address bc1p4nu57nc0skfdna6akkkfcxt2dnxh3xdch08ud52rnfmfw0pkx0jsgkzgqx
value 2294
address bc1qayvrap0zuy5xxdjrrhmvp0xresyj0sgjnkkmzp