Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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.
Matt Duncan's user avatar
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 ...
Guest's user avatar
  • 43
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....
brendan's user avatar
  • 41
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 ...
Justin Frevert's user avatar
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 ...
kugool's user avatar
  • 171
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 ...
strider's user avatar
  • 11
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 ...
Jacopo Mosconi's user avatar