diff --git a/raiden/blockchain/abi.py b/raiden/blockchain/abi.py index 1e9ae1e580..fe7a78e737 100644 --- a/raiden/blockchain/abi.py +++ b/raiden/blockchain/abi.py @@ -14,6 +14,8 @@ from raiden.utils import get_contract_path from raiden.constants import MIN_REQUIRED_SOLC +from distutils.version import LooseVersion + __all__ = ( 'CONTRACT_MANAGER', @@ -134,6 +136,13 @@ def validate_solc(): "Make sure the solidity compiler is installed and available on your $PATH." ) + elif LooseVersion(_solidity.compiler_version()) < LooseVersion(MIN_REQUIRED_SOLC[1:]): + raise RuntimeError( + 'You are currently using the solidity compiler version {}.\n' + 'Please upgrade to the minimum compatible version {}.'.format( + _solidity.compiler_version(), MIN_REQUIRED_SOLC) + ) + try: _solidity.compile_contract( get_contract_path('HumanStandardToken.sol'),