Helper for u32_copy_zip
(mut a: u32, mut b: u32)
| 49 | |
| 50 | ///Helper for u32_copy_zip |
| 51 | pub 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 | } |