openethereum / pwasm-tutorial

A step-by-step tutorial on how to write contracts in Wasm for Kovan
GNU General Public License v3.0
229 stars 34 forks source link

Block transfer to self. #32

Closed cheme closed 6 years ago

cheme commented 6 years ago

Last month while preparing a presentation about parity wasm contract design (I really like the idea of using wasm instead of evm bytecode and I also rust a lot), I spotted this issue : sending token to yourself leads to token creation which is bad. So this small but necessary PR fixes that by simply forbidding to transmit a token to yourself.

Please note that I did not check for other issues (I was mainly looking at the overall design, not contract specific implementation).

lexfrl commented 6 years ago

it seems to have sense! Thanks for PR, @cheme