
import base58
import binascii
def convert_tron_to_ethereum_address(tron_address):
try:
decoded_bytes = base58.b58decode(tron_address)
truncated_bytes = decoded_bytes[1:-4]
ethereum_address = binascii.hexlify(truncated_bytes).decode('utf-8')
return "0x" + ethereum_address
except Exception as e:
print(e)
return None
if __name__ == '__main__':
print(convert_tron_to_ethereum_address('TYH5fKhbo9a3uCxcw5B79z9wYATXu8wPtj'))