How to decode extrinsics in a block
How to decode extrinsics in a block
@Pittzhang314 It depends on what you want to decode. In general there is the module polkaj-scale and docs for it https://github.com/emeraldpay/polkaj/blob/master/docs/02-encoding.adoc. Many standard types has an implemented decoder in module polkaj-scale-types, but mostly not covered withing the docs. Please take a look into the source, maybe it already have an implementation. If not you make a suggestion/PR or implement it independently
use rpc method to fetch extrinsics by block , it's format will be like "0x410284d21a5689680a5e569d3c4370d2a94daab....."
but now I don't know how to convert this to byte[] , i'm now just use substring like "410284d21a5689680a5e569d3c4370d2a94daab....."
and use Hex.decode() to convert it to byte[] , but that will fail.
is there any idea to do this?
@splix
@splix It means that if I get Block, that will fetch extrinsics lists, how do I know which is transfer or transfer_keep_alive extrinsics, and decode it to readable data. ( like sender, signature, success...)
@splix I have already decode by BalanceTransferReader, the next i need to solve is previous question " how do i check extrinsics is transfer or transfer_keep_alive" .
and check this transfer is success or not.
Thank you a lot.
@BomaxChen sorry, missed the questions here. But we continued the conversation on Gitter.
@splix I have already decode by BalanceTransferReader, the next i need to solve is previous question " how do i check extrinsics is transfer or transfer_keep_alive" .
and check this transfer is success or not.
Thank you a lot.
how do you get the txhash? or how to get txhash from signature?