darkfi::runtime::import

Module util

Source
Expand description

Host functions for utilities

Functionsยง

  • drk_log ๐Ÿ”’
    Host function for logging strings.
  • get_block_target ๐Ÿ”’
    Will return currently configured block time target, in seconds
  • Will return current blockchain timestamp, defined as the last blockโ€™s timestamp.
  • get_call_index ๐Ÿ”’
    Will return current runtime configured verifying block height number
  • Grabs last block from the Blockchain overlay and then copies its height to the VMโ€™s object store.
  • get_object_bytes ๐Ÿ”’
    Retrieve an object from the object store specified by the index idx. The objectโ€™s data is written to ptr.
  • get_object_size ๐Ÿ”’
    Returns the size (number of bytes) of an object in the object store specified by index idx.
  • get_tx ๐Ÿ”’
    Reads a transaction by hash from the transactions store.
  • get_tx_hash ๐Ÿ”’
    Will return current runtime configured transaction hash
  • get_tx_location ๐Ÿ”’
    Reads a transaction location by hash from the transactions store.
  • Will return current runtime configured verifying block height number
  • set_return_data ๐Ÿ”’
    Writes data to the contract_return_data field of Env. The data will be read from ptr at a memory offset specified by len.