Closed carumusan closed 3 years ago
As a workaround until fix is released:
constant = substrate_connection.get_metadata_constant("Staking", "SessionsPerEra")
decoded_value = substrate_connection.decode_scale(constant.type, ScaleBytes(constant.constant_value))
since v0.13.4 there is a dedicated function to return the decoded value of runtime constants:
constant = substrate.get_constant("Balances", "ExistentialDeposit")
print(constant.value) # 10000000000
Returns the value "0x060000" which has yet to be decoded from scale.