yes, the opcode(s) that require is compiled into appear to consume very little gas (< 50). But if you throw, it looks like rest of gas supplied to the tx is consumed. So use require, not if throw.
I'm seeing a contract using a bunch of if throw which could be done with require as well.
It apparently a bad practice as I can see. You should use require if it satisfies the needs.
Can you look into this contract? https://etherscan.io/address/0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB#code why are they using all if?
ahah that's weird 😅
Обсуждают сегодня