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

Function _u32_copy_zip

bitvm/src/u32/u32_zip.rs:37–48  ·  view source on GitHub ↗

Helper for u32_copy_zip

(mut a: u32, mut b: u32)

Source from the content-addressed store, hash-verified

35
36/// Helper for u32_copy_zip
37pub fn _u32_copy_zip(mut a: u32, mut b: u32) -> Script {
38 assert!(a < b);
39 a = (a + 1) * 4 - 1;
40 b = (b + 1) * 4 - 1;
41
42 script! {
43 {a} OP_PICK {b+1} OP_ROLL
44 {a+1} OP_PICK {b+2} OP_ROLL
45 {a+2} OP_PICK {b+3} OP_ROLL
46 {a+3} OP_PICK {b+4} OP_ROLL
47 }
48}
49
50///Helper for u32_copy_zip
51pub fn _u32_zip_copy(mut a: u32, mut b: u32) -> Script {

Callers 1

u32_copy_zipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected