You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hx = str(call).encode().hex() #1
storageFee = ((len(hx) - 2) / 2) * PreimageDepositConst
blake2_256(hx) #2`
Values of #1 and #2 (and storageFee) are different from what's generated on polkadot.js UI, and the results didn't work anyway
Any help or pointers would be appreciated
Thanks
The text was updated successfully, but these errors were encountered:
The way you used to determine the bytes of the call is not correct, the bytes of the call (and any ScaleType) are stored in the call.data attribute (this is of type ScaleBytes). So the actual bytes are stored in call.data.data. Also there is a convenience function that the string representation of a ScaleBytes is in 0x1234 hex-format, so you can also just use str(call.data)
This is not clear in any related documentation
Sample code:
`call = substrate.compose_call(
call_module='Balances',
call_function='transfer',
call_params={
'dest': "5Gv8v85YeymUorg7No8vNAaaqpmSD71oT6RQYABnzEUXP9Af",
'value': 11111
})
hx = str(call).encode().hex() #1
storageFee = ((len(hx) - 2) / 2) * PreimageDepositConst
blake2_256(hx) #2`
Values of #1 and #2 (and storageFee) are different from what's generated on polkadot.js UI, and the results didn't work anyway
Any help or pointers would be appreciated
Thanks
The text was updated successfully, but these errors were encountered: