Closed BulatSaif closed 8 months ago
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:
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
with corresponding hex-encoded string:
call_obj = substrate.create_scale_object("Call")
call_obj.decode(ScaleBytes("0x03000b8052d3818b01"))
print(call_obj.value)
@arjanz, it works, thank you for explaining!
Polkadot js have a tab to decode call, it accepts string and returns call object, is something similar possible with py-substrate-interface?![Screenshot from 2023-10-30 20-05-33](https://github.com/polkascan/py-substrate-interface/assets/24387396/4c6bcddd-90bb-4cb3-af88-5203a6bbd204)