Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Blockchain CBDE Exam - Topic 2 Question 102 Discussion

Posted by Grover on Sep 19, 2024 at 08:58 AM

The difference between address.send() and address.transfer() is:

Suggested Answer: A

Get Premium CBDE Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
29 comments · newest first
LE
Leslie 11 months ago
Nah, .send is fine if used correctly!
CA
Carmelina 11 months ago
I think both are low-level and can be dangerous.
TR
Trinidad 11 months ago
Wait, .send sends all gas? That sounds risky!
DA
Dahlia 12 months ago
Totally agree, .transfer is safer!
CA
Caprice 12 months ago
.send returns a Boolean, right?
LI
Lindsey 12 months ago
I feel like I read that .call.value()() is safer, but I can't recall the specifics on how .send and .transfer differ exactly.
MA
Maryann 1 year ago
I'm a bit confused; I thought both .send and .transfer were safe against re-entrancy, but now I'm not so sure.
DO
Dominque 1 year ago
I remember practicing a question like this, and I think .send is considered more dangerous because it can send all the gas.
KA
Kassandra 1 year ago
I think .send returns a Boolean and .transfer throws an exception, but I'm not sure about the gas stipend part.
LO
Loreta 1 year ago
I remember learning about this, but I'm a bit fuzzy on the details now. I think it has something to do with the gas usage and error handling, but I'll need to think it through step-by-step to be sure I've got the right answer.
GL
Glory 1 year ago
Okay, I've got this. .send() returns a boolean and .transfer() throws an exception on error. But the more important difference is that .transfer() only sends the gas stipend of 2300, while .send() sends all the gas, which can be dangerous.
LA
Lamar 1 year ago
Hmm, I'm a bit unsure about this one. I know they're both ways to send Ether, but I can't quite remember the specifics of how they differ. I'll have to review my notes carefully.
BE
Belen 1 year ago
I'm pretty confident I know the difference between .send() and .transfer(). I think it has to do with how they handle errors, but I'll double-check the details.
ED
Edison 1 year ago
I think sustainability is definitely one of the key outcomes here, but I'm not sure about the second one.
SA
Sanjuana 2 years ago
Hmm, I was under the impression that .send is the dangerous one because it sends all the gas, while .transfer only sends the 2300 gas stipend. But I could be wrong.
FR
Francine 2 years ago
↳ replying to Sanjuana
D) .send and .transfer are both considered low-level functions which are dangerous, because they send all gas along. It's better to use address.call.value()() to control the gas-amount.
TH
Thersa 2 years ago
↳ replying to Sanjuana
C) .send returns a Boolean and .transfer throws an exception on error. .send is considered dangerous, because it sends all gas along, while .transfer only sends the gas stipend of 2300 gas along
HY
Hyman 2 years ago
↳ replying to Sanjuana
A) .send returns a Boolean and .transfer throws an exception on error. Both just forward the gasstipend of 2300 gas and are considered safe against re-entrancy.
LA
Lachelle 2 years ago
That's an interesting point, but I still think A is the correct answer based on the gas stipend and safety against re-entrancy.
BR
Brittni 2 years ago
I disagree, I believe the answer is C. .send is considered dangerous because it sends all gas along.
LA
Lachelle 2 years ago
I think the answer is A, because .send returns a Boolean and .transfer throws an exception on error.
KE
Kenny 2 years ago
Wait, isn't it the other way around? .send throws an exception and .transfer returns a Boolean on error. I'm pretty sure that's the difference.
LE
Lemuel 2 years ago
↳ replying to Kenny
D) .send and .transfer are both considered low-level functions which are dangerous, because they send all gas along. It's better to use address.call.value()() to control the gas-amount.
JU
Justine 2 years ago
↳ replying to Kenny
C) .send returns a Boolean and .transfer throws an exception on error. .send is considered dangerous, because it sends all gas along, while .transfer only sends the gas stipend of 2300 gas along
HE
Helaine 2 years ago
↳ replying to Kenny
B) .send throws an exception and .transfer returns a Boolean on error. Both just forward the gasstipend of 2300 gas and considered safe against re-entrancy
EV
Evangelina 2 years ago
↳ replying to Kenny
A) .send returns a Boolean and .transfer throws an exception on error. Both just forward the gasstipend of 2300 gas and are considered safe against re-entrancy.
SH
Shonda 2 years ago
I think the difference is that .send returns a Boolean and .transfer throws an exception on error. Both just forward the gasstipend of 2300 gas and are considered safe against re-entrancy.
FL
Florinda 2 years ago
↳ replying to Shonda
Yes, that's correct. Both just forward the gasstipend of 2300 gas and are safe against re-entrancy.
BI
Billye 2 years ago
↳ replying to Shonda
I agree, .send returns a Boolean and .transfer throws an exception on error.
0/2000 characters

Save Cancel