Module near_primitives::utils
source · [−]Modules
Structs
A wrapper around Option
A data structure for tagging data as already being validated to prevent redundant work.
Functions
Creates a new action_hash from a given receipt, a block hash and an action index. This method is backward compatible, so it takes the current protocol version.
Creates a new data_id
from a given action hash, a block hash and a data index.
This method is backward compatible, so it takes the current protocol version.
Creates a unique random seed to be provided to VMContext
from a give action_hash
and
a given random_seed
.
This method is backward compatible, so it takes the current protocol version.
Creates a new Receipt ID from a given receipt, a block hash and a new receipt index. This method is backward compatible, so it takes the current protocol version.
Creates a new Receipt ID from a given signed transaction and a block hash. This method is backward compatible, so it takes the current protocol version.
Converts timestamp in ns into DateTime UTC time.
Generate random string of given length
Compute number of seats per shard for given total number of seats and number of shards.
Wrap an object that implements Serialize into another object that implements Display. When used display in this object it shows its json representation. It is used to display complex objects using tracing.
Converts DateTime UTC time into timestamp in ns.