Namespace Storage

This module contains functions for interacting with the key-value datastore, which is used for persistent storage of data on the blockchain.

The supported value types for the datastore include string, Args and StaticArray<u8>.

This module also provides functions for setting the executable bytecode of a smart contract address.

Remarks

The datastore is used to store data that is expected to persist between contract executions, such as contract state or user information.

The set, get, has, and del functions are used to manipulate the data in the datastore of the current address, while the setOf, getOf, hasOf, and deleteOf functions are used to manipulate the data in the datastore of a different address.

The setOf, deleteOf and appendOf functions can only be called at smart contract generation time by the parent smart contract to write to or delete data from the child's datastore. These functions allow the parent smart contract to manipulate the child smart contract's datastore during the smart contract execution time where createSC is called, but not after.

It is not possible in AssemblyScript to catch thrown exceptions. All exceptions thrown by functions in this module will stop the execution of the smart contract.

You can see that your smart contract execution is stopped by looking at the events.

Index

Functions

Generated using TypeDoc