Questions tagged [block-hash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
60 views

How to perform chain state query for entries AND at a block hash?

I can do this to get all the structs in my storage: let queryResult = await api.query.mypallet.mystorage.entries(); but I want this query AT a specific block hash: let currentHeader = ...
Robert La Ferla's user avatar
2 votes
1 answer
79 views

How do you query a list of all previous block hashes from a substrate based chain?

I can see how to do so from the subscan api but I am interested in understanding how to query this data from the chain itself. Ie via a storage function or by another means
olliecorbs's user avatar
1 vote
1 answer
336 views

How do I get the block hash of an event?

I am subscribing system events using the events api. After I got the specific event I am looking for, how should get the block hash of this event? Thanks api.query.system.events((events) => { ...
KaiKang.eth's user avatar