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

Function u4_drop

bitvm/src/u4/u4_std.rs:69–78  ·  view source on GitHub ↗

Drops n u4 (1 element) elements of the stack

(n: u32)

Source from the content-addressed store, hash-verified

67
68/// Drops n u4 (1 element) elements of the stack
69pub 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
81pub fn u4_number_to_nibble(n: u32) -> Script {

Callers 8

u4_drop_lshift_tablesFunction · 0.85
u4_drop_rshift_tablesFunction · 0.85
u4_drop_quotient_tableFunction · 0.85
u4_drop_modulo_tableFunction · 0.85
u4_drop_full_logic_tableFunction · 0.85
u4_drop_full_lookupFunction · 0.85
u4_drop_half_tableFunction · 0.85
u4_drop_half_lookupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected