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
So for the async version of the substrate interface, the ss58 addresses are either encoded or decoded, rather than returned in the desired format.
py-substrateinterface: '5HK5tp6t2S59DywmHRWPBVJeJ86T61KjurYqeooqj8sREpeN'
async-substrate-interface: ((232, 36, 201, 53, 148, 3, 87, 175, 115, 201, 97, 189, 215, 56, 126, 26, 184, 33, 236, 41, 57, 236, 209, 157, 170, 254, 96, 129, 174, 154, 230, 116), )
Any help would be great in getting the addresses either back into the correct format or fixing the bug.
Thanks
The text was updated successfully, but these errors were encountered:
Looking into this. Until then you can decode the ss58 with the function we have in bittensor:
defdecode_account_id(account_id_bytes: Union[bytes, str]) ->str:
""" Decodes an AccountId from bytes to a Base64 string using SS58 encoding. Args: account_id_bytes (bytes): The AccountId in bytes that needs to be decoded. Returns: str: The decoded AccountId as a Base64 string. """ifisinstance(account_id_bytes, tuple) andisinstance(account_id_bytes[0], tuple):
account_id_bytes=account_id_bytes[0]
# Convert the AccountId bytes to a Base64 stringreturnss58_encode(bytes(account_id_bytes).hex(), SS58_FORMAT)
The following two should return the exact same output:
Instead the output looks like this:
So for the async version of the substrate interface, the ss58 addresses are either encoded or decoded, rather than returned in the desired format.
py-substrateinterface:
'5HK5tp6t2S59DywmHRWPBVJeJ86T61KjurYqeooqj8sREpeN'
async-substrate-interface:
((232, 36, 201, 53, 148, 3, 87, 175, 115, 201, 97, 189, 215, 56, 126, 26, 184, 33, 236, 41, 57, 236, 209, 157, 170, 254, 96, 129, 174, 154, 230, 116), )
Any help would be great in getting the addresses either back into the correct format or fixing the bug.
Thanks
The text was updated successfully, but these errors were encountered: