-
Polkadot js have a tab to decode call, it accepts string and returns call object, is something similar possible with py-substrate-interface? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Of course, you can manually create an extrinsic_obj = substrate.create_scale_object("Extrinsic")
extrinsic_obj.decode(ScaleBytes("0x280403000b8052d3818b01"))
print(extrinsic_obj.value) And If you only want to decode the actual call_obj = substrate.create_scale_object("Call")
call_obj.decode(ScaleBytes("0x03000b8052d3818b01"))
print(call_obj.value) |
Beta Was this translation helpful? Give feedback.
-
@arjanz, it works, thank you for explaining! |
Beta Was this translation helpful? Give feedback.
Of course, you can manually create an
Extrinsic
SCALE-object (in PolkadotJS apps it's titled "hex-encoded call" but in reality this is an "hex-encoded extrinsic", which of course contains the call. I personally think this is a bit misleading) and then decode the hex-encoded string. Something like:And If you only want to decode the actual
Call
with corresponding hex-encoded string: