Skip to content

Low - 'if(!condition) throw;' should be avoided #136

@k4ms

Description

@k4ms

This concerns many occurrences in source files MultiSigWallet.sol and MiniMeToken.sol.

There are several reason to use 'require(condition);' instead of 'if(!condition) throw;' :

  1. Faster execution, consumes less gas

  2. More clear : 'throw' naming is perturbing because it does not throw an exception that we can catch.

  3. Solidity will certainly deprecate throw (Deprecate throw and suggest revert()/assert()/require() instead argotorg/solidity#1793).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions