.unwrap() .index, 0x030201, ); } #[test] fn inscription_parent_with_four_byte_index_field_is_deserialized_correctly() { assert_eq!( Inscription { parent: Some(vec![ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x02, 0x03, 0x04, ]), ..Default::default() } .parent() .unwrap() .index, 0x04030201, ); } #[test] fn metadata_function_decodes_metadata() { assert_eq!( Inscription { metadata: Some(vec![0x44, 0, 1, 2, 3]), ..Default::default() } .metadata() .unwrap(), Value::Bytes(vec![0, 1, 2, 3]), ); } #[test] fn metadata_function_returns_none_if_no_metadata() { assert_eq!( Inscription { metadata: None, ..Default::default() } .metadata(),