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?