1

After calling the RPC method getblock. How can I get the confirmation time of this block in the genblock method?

3

1 Answer 1

1

If you look at any block there's usually a timestamp.set extrinsic that contains the time that the block was proposed by the collator.

For example:

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.calamari.systems%2F#/explorer/query/0x7906c21c83542b2cd3ee27d889ac2f208c97ac1d81ad5e5cb0594dea3f2505b5

The time is in unix epoc time (seconds since 1/1/1970). You can translate it manually using a website, but all programming languages will convert from that format too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.