All Questions
Tagged with storage offchain-worker
7 questions
0
votes
0
answers
13
views
Substrate: function can be called only from offchain workers
i just made a pallet where there is a function callable from users, this function will save some input data inside a storageMap, then offchain worker take the input data, do some operations and should ...
2
votes
0
answers
34
views
Are onchain storage reads cheaper from offchain worker versus from extrinsic?
Are reads from offchain workers less expensive than reads from extrinsics? I am determining how to do some large, asynchronous processing of data and determining whether the reads in this process see ...
1
vote
0
answers
41
views
Fetching offchain storage value returns different value than the value fetched using localStorageGet function
I need to get the rpc_url value set initially from the explorer. The localStorageGet rpc function returns the correct value of the rpc_url.
This returns https://eth-mainnet.g.alchemy.com/v2/MY_API_KEY
...
4
votes
1
answer
52
views
Change state from a task
I have a asynchronous task running in service.spawn_essential_task(task).
Which does some stuff and wants to write data in storage. How can i achieve this?
Changing state by making runtime_apis to ...
4
votes
2
answers
213
views
Read a value from offchain storage of a node
I want to read a single value from OffchainStorage of a live substrate node. Is it possible? Assume I can not use localStorageGet rpc request because it is an unsafe rpc.
2
votes
1
answer
74
views
How to write a dispatch function which can only access from offchain worker with signed extrinsic/transaction?
I want to modify some on-chain storage from offchain worker by sending a signed transaction, so I write a dispatch function which handles the transaction. But the dispatch function also can be ...
4
votes
0
answers
108
views
Accessing On-Chain Data In an Off-Chain Worker
I am looking to aggregate On-Chain data in an Off-Chain Worker, e.g. summing transaction fees included in blocks from the last 24 hrs. This is listed as one of the main use cases for Off-Chain Workers....