version: 0, }), Ok(Some(Runestone { edicts: vec![Edict { id: 1, amount: 2, output: 3, }], ..Default::default() })) ); } #[test] fn runestone_size() { #[track_caller] fn case(edicts: Vec, etching: Option, size: usize) { assert_eq!( Runestone { edicts, etching, ..Default::default() } .encipher() .len() - 1 - b"RUNE_TEST".len(), size ); } case(Vec::new(), None, 1); case( Vec::new(), Some(Etching { rune: Rune(0), ..Default::default() }), 4, ); case( Vec::new(), Some(Etching { divisibility: MAX_DIVISIBILITY, rune: Rune(0), ..Default::default() }), 6, ); case( Vec::new(), Some(Etching { divisibility: MAX_DIVISIBILITY, rune: Rune(0), symbol: Some('$'),