Apress / beg-ethereum-smart-contracts-prog

Source code for 'Beginning Ethereum Smart Contracts Programming' by Wei-Meng Lee
https://www.apress.com/9781484250853
Other
10 stars 11 forks source link

syntax/run error #1

Open iceslim0 opened 4 years ago

iceslim0 commented 4 years ago

I am unsure what exactly this line is trying to do, and it won't run.

blen@phxqv:~/dev-blen/chaindev> python blockchain.py File "blockchain.py", line 62 content = f'{index}{hash_of_previous_block}{transactions}{nonce}'.encode()
^ SyntaxError: invalid syntax blen@phxqv:~/dev-blen/chaindev>

sigmund505 commented 4 years ago

Had the same error. Used Python 3.6 and it worked for me.

pol-hallen commented 3 years ago

works with python3.8