[][src]Module casperlabs_contract::contract_api::storage

Functions for accessing and mutating local and global state.

Functions

add

Adds value to the one currently under uref in the global state.

add_local

Adds value to the one currently under key in the context-local partition of global state.

new_uref

Returns a new unforgeable pointer, where the value is initialized to init.

read

Reads value under uref in the global state.

read_local

Reads the value under key in the context-local partition of global state.

read_or_revert

Reads value under uref in the global state, reverts if value not found or is not T.

store_function

Stores the serialized bytes of an exported, non-mangled extern "C" function as a new contract under a URef generated by the host.

store_function_at_hash

Stores the serialized bytes of an exported, non-mangled extern "C" function as a new contract at an immutable address generated by the host.

write

Writes value under uref in the global state.

write_local

Writes value under key in the context-local partition of global state.