Open jimmychu0807 opened 3 years ago
Either create a recipe of this, or write a guide in the Runtime section of developer guide.
Runtime
To use indexing data from Runtime:
sp_io::offchain_index::set(&b"my_key", &"my_value".encode());
Data in Off-chain DB can be either read by Off-chain workers (local storage API) or via RPC, using offchain_localStorageGet method.
offchain_localStorageGet
Either create a recipe of this, or write a guide in the
Runtime
section of developer guide.Extracted notes from @tomusdrw:
To use indexing data from Runtime:
Data in Off-chain DB can be either read by Off-chain workers (local storage API) or via RPC, using
offchain_localStorageGet
method.