I'm trying to get the raw value of the transaction without using the websocket. For now I'm using a WebSocket for my application and I am in the process of removing it, I could find everything I wanted on substrate expect the original value in "extrinsics". Is there a way to get it ? My current work is to to try to rebuilt it with the data from the block that I received from substrate but not sure of how this can be done. But even if this can be done, every type of transaction has a different content and that is opening the door for lot of mistakes.
{
"block": {
"header": {
"parentHash": "0x723d60ec7870e881477ee638aae8b9226e37d0b1c1d0a8b8fbea08d5594e412d",
"number": "0x1b",
"stateRoot": "0x7ffe18a6a48979ccf0f41b5ae31bcf14076ba60cf3e006a33856cd0411df9465",
"extrinsicsRoot": "0x80f5180564d5f5dc1b98e18abbd383dc35f0bc0ec996c517bc07316c431da1a9",
"digest": {
"logs": [
"0x0642414245b5010300000000e7e2cd1000000000f0ce7e95377374a4a1d157034f14d949547bb25acebcc2533a1ef94690203409f596f4167f577ec5971f2718da3005d80258de8008f42833a8bed8b812b45e082d1d9f452808a6df2529e5a8d8a7cb36e581460063576d9f77ced3a91a5e2a06",
"0x054241424501013e06daff0861a460e3e4433e06d9ea3e1a03c72d4725fa2d8d4cfc995a9b3b3e07e64b9f63200c05b895a69746c63d21ebf319ca525604356a70dede74522881"
]
}
},
"extrinsics": [
"0x280403000b100676d98901",
"0xa105043600040000000000cc7593f343f0e7386bbf1ac7a3891f6cd8285260aab616ebbb6dc13a3334654466212cccbc2f2381610a7b094cdac6c6878a49c2af9a3c127d15c769ff7f93870000e41cee5fe6ab936f465874a8c6bac34fc0c0cdea153c01c3aeedb276dd30c6b16841043b15dce2a5c9d8c800c6999815bcc68efc7ed0401186dada1e935c415b4a7ab3d76daa16850f1bb470666f2d9a27849d8fec56fac55931f8062cfc17281f080642414245b5010100000000e6e2cd10000000008a356eca73e2f18c3c301a59d96b3e21f4f9b939a697e596135c657f9b18243cb1a2d946ade5a0b2eb743d26fa539051d39775946231a0b595f18a7e86c98100238d68623624e1ebebc7a519ca429cb7892425ade17e0789963f8fccebfd360505424142450101a6423a420b9a524e2e2df92777a134ddc4da865f82f6ed94b9273972d6adfd0975a926e70a6332e055edceb3e6e36a57973f8b6c1cd05a8bac57e87bf2c8cc8c",
"0x41028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01b8b84d2b12deb6519799e4a14c0b1c4138bb25f9d60a50ec320967982675eb69f1ea2fa65419ab354d7780c082fad3d41d45b4db43061cc7a73b2d432987b6848501040005070056f14a2288b6ab1668ea4281a830666821431ba62cfbdf6fb432f468ba56116d07005cb2ec22"
]
},
"justifications": null
}
I would like this value
0x41028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01b8b84d2b12deb6519799e4a14c0b1c4138bb25f9d60a50ec320967982675eb69f1ea2fa65419ab354d7780c082fad3d41d45b4db43061cc7a73b2d432987b6848501040005070056f14a2288b6ab1668ea4281a830666821431ba62cfbdf6fb432f468ba56116d07005cb2ec22
The best way would be directly from substrate and if not possible build from what substrate gives me. Is this possible without websocket ?
scale-value
crate can be used for dynamicly deserialising scale if you don't want to use the standard per-parachain strong typing routes that subxt gives. (You're asking how to decode a block and get the extrinsics. It's a little tricky because of the sign extras on each signed transaction. I have a go here but don't take it as gospel: github.com/gilescope/polkadyn/blob/… )