Module helpers

Source
Expand description

A few utilities

Functionsยง

amount_to_drops
Convert amount to drops
buffer_zeroize
Zeroize a buffer
drops_to_amount
Convert amount to drops
is_buffer_equal
Tests two buffers for equality
is_buffer_equal_20
Tests two 20-byte buffers for equality
is_buffer_equal_32
Tests two 32-byte buffers for equality
is_txn_ingoing
Checks whether the transaction is ingoing
is_txn_outgoing
Checks whether the transaction is outgoing
require
Rolls back the transaction if the condition is not met
slice
Returns a slice of the given data with the specified length
slice_mut
Returns a mutable slice of the given data with the specified length