Timeline for <address>.send vs <address>.transfer best practice usage?
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 27, 2023 at 14:54 | comment | added | Paul Razvan Berg |
@RusAlex I've updated the answer with a TLDR; about why transfer and send should be avoided. You might also want to look at this post.
|
|
Sep 27, 2023 at 14:53 | history | edited | Paul Razvan Berg | CC BY-SA 4.0 |
Move recommendation at the top + include TLDR
|
Jul 24, 2021 at 11:37 | comment | added | RusAlex | Why in 2021 you cannot use send and transfer ? Manuals says it's safe. And the gas set to 2300 | |
May 20, 2021 at 13:58 | comment | added | ToasteR |
Besides the checks-effect and guarding methods to preven reentrancy, would it also be secure to use recipient.call{gas: 3000, value:amt}(""); ? (I just used 3000 as a gas amount here, ofc this can be adjusted accordingly)
|
|
S May 14, 2021 at 8:25 | history | suggested | jlo | CC BY-SA 4.0 |
call.value()() is deprecated
|
May 13, 2021 at 22:26 | review | Suggested edits | |||
S May 14, 2021 at 8:25 | |||||
Jun 16, 2020 at 10:58 | history | edited | CommunityBot |
Commonmark migration
|
|
Jan 15, 2020 at 19:41 | comment | added | Chan-Ho Suh |
Well, if you're going to now advise people to not use send or transfer , something should be said about reentrancy, as that was the point of the 2300 gas stipend for the other approaches (misguided as they turned out to be).
|
|
Jan 15, 2020 at 16:51 | history | edited | alper | CC BY-SA 4.0 |
added 11 characters in body
|
Jan 15, 2020 at 10:54 | history | edited | alper | CC BY-SA 4.0 |
added 250 characters in body
|
Dec 8, 2019 at 10:49 | comment | added | eth♦ |
Dec 2019: call.value()() should now be used for transferring ether. (send and transfer should be avoided.) See: ethereum.stackexchange.com/questions/78124/… I will clean up this comment if this answer is updated.
|
|
S Jan 3, 2018 at 13:29 | history | suggested | Evstifeev Roman | CC BY-SA 3.0 |
transfer() does not allow setting gas limit
|
Jan 3, 2018 at 10:15 | review | Suggested edits | |||
S Jan 3, 2018 at 13:29 | |||||
Aug 3, 2017 at 20:18 | comment | added | Jakub Wojciechowski | Transfer throw an exception and all of the changes in a transaction are reverted. | |
Aug 3, 2017 at 14:52 | comment | added | Curt |
If send fails, it returns false, correct? What does transfer do if it fails? Does it return false? Does it revert all changes?
|
|
Jul 3, 2017 at 23:03 | vote | accept | Michael | ||
Jul 3, 2017 at 21:46 | history | answered | Jakub Wojciechowski | CC BY-SA 3.0 |