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.
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.
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.
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.
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.
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.
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
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.
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.
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
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
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.
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.
Leslie
3 months agoCarmelina
3 months agoTrinidad
3 months agoDahlia
4 months agoCaprice
4 months agoLindsey
4 months agoMaryann
4 months agoDominque
4 months agoKassandra
5 months agoLoreta
5 months agoGlory
5 months agoLamar
5 months agoBelen
5 months agoEdison
5 months agoSanjuana
1 year agoFrancine
1 year agoThersa
1 year agoHyman
1 year agoLachelle
1 year agoBrittni
1 year agoLachelle
1 year agoKenny
1 year agoLemuel
1 year agoJustine
1 year agoHelaine
1 year agoEvangelina
1 year agoShonda
1 year agoFlorinda
1 year agoBillye
1 year ago