Closed gutenye closed 3 years ago
Yes there is and it's called Polkascan :) You can also run the application yourself (https://github.com/polkascan/polkascan-os) and this will provide API endpoints just like our hosted version.
Examples:
https://explorer-31.polkascan.io/polkadot/api/v1/extrinsic/<extrinsic-hash>?include=events
or https://explorer-31.polkascan.io/polkadot/api/v1/extrinsic/<block-height>-<extrinsic-index>?include=events
Note that the public hosted versions can be used freely (fair use) but may be subject to change in the near future. And you are right, the RPC doesn't maintain indices to access extrinsics directly.
Thanks.
Hey Arjan,
Is there an API that supports get extrinsic data from
<extrinsic-hash>
or<block-height>-<extrinsic-index>
? It's a common use case that you want to query that extrinsic for the information.AFAIK, the node RPC doesn't provide a direct method, but you can get the block data first, then get the transaction data from the block by index.
Thanks a lot.