Inscription #75977178#75,977,178htmlInscription #73760866#73,760,866htmlInscription #73667954#73,667,954htmlInscription #73539670#73,539,670htmlInscription #73539432#73,539,432htmlInscription #73539085#73,539,085htmlInscription #73534318#73,534,318htmlInscription #73525928#73,525,928htmlInscription #70616957#70,616,957html#70,547,309text#70,546,656textInscription #69586888#69,586,888htmlInscription #68973599#68,973,599htmlInscription #67433328#67,433,328htmlInscription #65988269#65,988,269pngInscription #65868009#65,868,009pngInscription #65516713#65,516,713htmlInscription #64980609#64,980,609svg#64,399,512Inscription #64063698#64,063,698htmlInscription #60634445#60,634,445htmlsenadormajor.btc#54,553,043textInscription #54237299#54,237,299htmlInscription #54236486#54,236,486htmlInscription #50311604#50,311,604htmlInscription #50139067#50,139,067htmlInscription #49236212#49,236,212pngInscription #49112946#49,112,946pngmint1,000. fud#47,411,054brc-20Inscription #46102669#46,102,669pngInscription #46102643#46,102,643pngInscription #46102635#46,102,635pngInscription #46101056#46,101,056pnguse super::*; fn target_as_block_hash(target: bitcoin::Target) -> BlockHash { BlockHash::from_raw_hash(Hash::from_byte_array(target.to_le_bytes())) } #[derive(Boilerplate)] pub(crate) struct BlockHtml { hash: BlockHash, target: BlockHash, best_height: Height, block: Block, height: Height, inscription_count: usize, featured_inscriptions: Vec<InscriptionId>, } impl BlockHtml { pub(crate) fn new( block: Block, height: Height, best_height: Height, inscription_count: usize, featured_inscriptions: Vec<InscriptionId>, ) -> Self { Self { hash: block.header.block_hash(), target: target_as_block_hash(block.header.target()), block, height, best_height, inscription_count, featured_inscriptions, } } } #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BlockJson { pub hash: BlockHash, pub target: BlockHash, pub best_height: u32, pub height: u32, pub inscriptions: Vec<InscriptionId>, } impl BlockJson { pub(crate) fn new(#45,022,209textpub(crate) use { super::*, bitcoin::{ blockdata::{opcodes, script, script::PushBytesBuf}, ScriptBuf, Witness, }, pretty_assertions::assert_eq as pretty_assert_eq, std::iter, test_bitcoincore_rpc::TransactionTemplate, unindent::Unindent, }; macro_rules! assert_regex_match { ($value:expr, $pattern:expr $(,)?) => { let regex = Regex::new(&format!("^(?s){}$", $pattern)).unwrap(); let string = $value.to_string(); if !regex.is_match(string.as_ref()) { panic!( "Regex:\n\n{}\n\n…did not match string:\n\n{}", regex, string ); } }; } macro_rules! assert_matches { ($expression:expr, $( $pattern:pat_param )|+ $( if $guard:expr )? $(,)?) => { match $expression { $( $pattern )|+ $( if $guard )? => {} left => panic!( "assertion failed: (left ~= right)\n left: `{:?}`\n right: `{}`", left, stringify!($($pattern)|+ $(if $guard)?) ), } } } pub(crate) fn blockhash(n: u64) -> BlockHash { let hex = format!("{n:x}");#45,021,660textInscription #44969855#44,969,855pngInscription #44698567#44,698,567svgInscription #44687992#44,687,992svgInscription #44680972#44,680,972svgInscription #43301539#43,301,539svgInscription #43298241#43,298,241svgInscription #41650852#41,650,852pngInscription #41649622#41,649,622pngInscription #14030929#14,030,929html685802.bitmap#13,926,971text138125.bitmap#13,044,112textInscription #11302044#11,302,044webpInscription #633324#633,324png