Expand description
Utility functions
Functionsยง
- Everyone can call this. Will return runtime configured block target.
- get_
block_ ๐ โtarget_ - Everyone can call this. Will return current blockchain timestamp.
- get_
blockchain_ ๐ โtime_ - Only deploy(), metadata() and exec() can call this. Will return runtime configured verifying block height.
- get_
call_ ๐ โindex_ - Only exec() can call this. Will return last block height.
- get_
last_ ๐ โblock_ height_ - Internal function, get raw bytes from the objects store
- get_
object_ ๐ โbytes_ - Internal function, get bytes size for an object in the store
- get_
object_ ๐ โsize_ - Only metadata() and exec() can call this. Will return transaction bytes by provided hash.
- get_tx_ ๐ โ
- Only deploy(), metadata() and exec() can call this. Will return runtime configured transaction hash.
- get_
tx_ ๐ โhash_ - Only metadata() and exec() can call this. Will return transaction location by provided hash.
- get_
tx_ ๐ โlocation_ - Everyone can call this. Will return runtime configured verifying block height.
- get_
verifying_ ๐ โblock_ height_ - parse_
ret ๐Auxiliary function to parse db_get return value. If either of these functions returns a negative integer error code, convert it into aContractError
. - parse_
retval_ ๐u32 - Calls the
set_return_data
WASM function. Returns Ok(()) on success. Otherwise, convert the i64 error code into aContractError
. - set_
return_ ๐ โdata_