The code I am having trouble with:
new_address = Web3.sha3(rlp.encode([normalize_address(accountAddress), nonce]))[-40:]
return '0x'+new_address
new_adress
remains in bytes and I can't join it with 0x to produce normal string that will be the ethereum address. How to turn the bytes to string again? just new_address.decode()
doesn't work and anything with utf-8 in it?