Timeline for Does an entire transaction revert when throw occurs?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 13, 2016 at 17:10 | comment | added | ZMitton | I have to use address.call() because it's an 'unknown' contract, but it looks like I'm still safe from my code being left half done. If they throw, the only options are: 1 total revert. Or 2 the call from address.call() is reverted and my code continues as if nothing happened. (Ignoring reentrancy which I've protected myself against in other ways) | |
Sep 13, 2016 at 16:40 | comment | added | Matthew Schmidt | That's correct. Unless you deliberately use address.call(), the exception will propagate downwards automatically. That said, you may wish to investigate the situation in depth. An unknown contract can later call your contract again (the reentrancy attack), and your contract will be for that moment in an intermediate state. | |
Sep 12, 2016 at 23:21 | vote | accept | ZMitton | ||
Sep 12, 2016 at 21:33 | comment | added | ZMitton | If I make a call within my contract, to an unknown contract, I can still be sure the unknown contract does not have the ability to leave my contract in an intermediate state. | |
Sep 12, 2016 at 19:45 | history | answered | Matthew Schmidt | CC BY-SA 3.0 |