MCPcopy Create free account
hub / github.com/BitVM/BitVM / _u32_zip_copy

Function _u32_zip_copy

bitvm/src/u32/u32_zip.rs:51–62  ·  view source on GitHub ↗

Helper for u32_copy_zip

(mut a: u32, mut b: u32)

Source from the content-addressed store, hash-verified

49
50///Helper for u32_copy_zip
51pub fn _u32_zip_copy(mut a: u32, mut b: u32) -> Script {
52 assert!(a < b);
53
54 a = (a + 1) * 4 - 1;
55 b = (b + 1) * 4 - 1;
56 script! {
57 {a} OP_ROLL {b} OP_PICK
58 {a+1} OP_ROLL {b} OP_PICK
59 {a+2} OP_ROLL {b} OP_PICK
60 {a+3} OP_ROLL {b} OP_PICK
61 }
62}

Callers 1

u32_copy_zipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected