Skip to main content
added 16 characters in body; edited tags
Source Link
eth
  • 86.5k
  • 53
  • 287
  • 411

Since assertassert would consume all gas and requirerequire would return all gas, Is is there any reason to use assertassert not requirerequire? Use requireUsing require to refund gas seems always a better choice than consuming them?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I still don't get it, why: what is the benefit of choosing a command that consumingconsumes all gas, any benefit?

Since assert would consume all gas and require would return all gas, Is there any reason to use assert not require? Use require to refund gas seems always a better choice than consuming them?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I still don't get it, why choosing a command that consuming all gas, any benefit?

Since assert would consume all gas and require would return all gas, is there any reason to use assert not require? Using require to refund gas seems always a better choice than consuming them?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I still don't get it: what is the benefit of choosing a command that consumes all gas?

Post Merged (destination) from ethereum.stackexchange.com/questions/119636/…
edited tags
Link
Rob Hitchens
  • 55.6k
  • 11
  • 91
  • 146
deleted 11 characters in body
Source Link

Since assert would consume all gas and require would return all gas, Is there any reason to use assert not require?

My current understanding Use require to refund gas is like energy, like ether, like money, so why using assertseems always a better choice than consuming them?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I still don't get it, why choosing a command that consuming all gas, any benefit?

Since assert would consume all gas and require would return all gas, Is there any reason to use assert not require?

My current understanding gas is like energy, like ether, like money, so why using assert?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I don't get it, why choosing a command that consuming all gas, any benefit?

Since assert would consume all gas and require would return all gas, Is there any reason to use assert not require? Use require to refund gas seems always a better choice than consuming them?

I saw some explanation in Difference between require and assert and the difference between revert and throw but I still don't get it, why choosing a command that consuming all gas, any benefit?

Source Link
Loading