Drops n u4 (1 element) elements of the stack
(n: u32)
| 67 | |
| 68 | /// Drops n u4 (1 element) elements of the stack |
| 69 | pub fn u4_drop(n: u32) -> Script { |
| 70 | script! { |
| 71 | for _ in 0..n / 2 { |
| 72 | OP_2DROP |
| 73 | } |
| 74 | if n & 1 == 1 { |
| 75 | OP_DROP |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | /// Divides the number onto u4 parts and push them to the stack, least significant part being on the top |
| 81 | pub fn u4_number_to_nibble(n: u32) -> Script { |
no outgoing calls
no test coverage detected