Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a recipe on using off-chain indexing #398

Open
jimmychu0807 opened this issue Dec 11, 2020 · 0 comments
Open

Write a recipe on using off-chain indexing #398

jimmychu0807 opened this issue Dec 11, 2020 · 0 comments

Comments

@jimmychu0807
Copy link
Collaborator

jimmychu0807 commented Dec 11, 2020

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant