muellerberndt / laser-ethereum

Symbolic virtual machine for Ethereum
MIT License
68 stars 20 forks source link

Wrong "ADDRESS" opcode handling #14

Closed p0n1 closed 6 years ago

p0n1 commented 6 years ago

Confusing code here:

https://github.com/b-mueller/laser-ethereum/blob/55b7c50c45f926af055a1410d516aaf947a8db25/laser/ethereum/svm.py#L617-L618

I think the "ADDRESS" execution should return the address of current contract as follows.

state.stack.append(environment.address)
muellerberndt commented 6 years ago

That's correct, thanks!

muellerberndt commented 6 years ago

Btw, not sure if you're interested, but we're looking for someone to do further work on laser-ethereum - implementing the remaining opcodes etc. Ping me on the Mythril Gitter if you like.