New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Blockchain Exam CBDE Topic 2 Question 102 Discussion

Actual exam question for Blockchain's CBDE exam
Question #: 102
Topic #: 2
[All CBDE Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Sanjuana
3 months 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.
upvoted 0 times
Francine
2 months ago
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.
upvoted 0 times
...
Thersa
2 months ago
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
upvoted 0 times
...
Hyman
3 months ago
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.
upvoted 0 times
...
...
Lachelle
3 months 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.
upvoted 0 times
...
Brittni
3 months ago
I disagree, I believe the answer is C. .send is considered dangerous because it sends all gas along.
upvoted 0 times
...
Lachelle
3 months ago
I think the answer is A, because .send returns a Boolean and .transfer throws an exception on error.
upvoted 0 times
...
Kenny
3 months 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.
upvoted 0 times
Lemuel
2 months ago
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.
upvoted 0 times
...
Justine
3 months ago
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
upvoted 0 times
...
Helaine
3 months ago
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
upvoted 0 times
...
Evangelina
3 months ago
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.
upvoted 0 times
...
...
Shonda
3 months 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.
upvoted 0 times
Florinda
2 months ago
Yes, that's correct. Both just forward the gasstipend of 2300 gas and are safe against re-entrancy.
upvoted 0 times
...
Billye
2 months ago
I agree, .send returns a Boolean and .transfer throws an exception on error.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77
a