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

Save Cancel