diff --git a/CHANGELOG.md b/CHANGELOG.md index 925316057..9fa40b82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/iamdefinitelyahuman/brownie) +## [1.6.7](https://github.com/iamdefinitelyahuman/brownie/tree/v1.6.7) - 2020-03-09 + +### Fixed +- INVALID instructions with no related ast node (assembly) +- Missing f-strings in compiler output + ## [1.6.6](https://github.com/iamdefinitelyahuman/brownie/tree/v1.6.6) - 2020-03-03 ### Changed diff --git a/brownie/_cli/__main__.py b/brownie/_cli/__main__.py index 86068f701..1ec4d91ed 100644 --- a/brownie/_cli/__main__.py +++ b/brownie/_cli/__main__.py @@ -10,7 +10,7 @@ from brownie.utils import color, notify from brownie.utils.docopt import docopt, levenshtein_norm -__version__ = "1.6.6" +__version__ = "1.6.7" __doc__ = """Usage: brownie [...] [options ] diff --git a/brownie/project/compiler/solidity.py b/brownie/project/compiler/solidity.py index 85c5defaa..ffc9534d4 100644 --- a/brownie/project/compiler/solidity.py +++ b/brownie/project/compiler/solidity.py @@ -52,9 +52,9 @@ def compile_from_input_json( input_json["settings"]["evmVersion"] = EVM_EQUIVALENTS[input_json["settings"]["evmVersion"]] if not silent: - print("Compiling contracts...\n Solc version: {str(solcx.get_solc_version())}") + print(f"Compiling contracts...\n Solc version: {str(solcx.get_solc_version())}") - opt = "Enabled Runs: {optimizer['runs']}" if optimizer["enabled"] else "Disabled" + opt = f"Enabled Runs: {optimizer['runs']}" if optimizer["enabled"] else "Disabled" print(f" Optimizer: {opt}") if input_json["settings"]["evmVersion"]: @@ -478,7 +478,8 @@ def _find_revert_offset( # statement within a function if fn_node[-1].nodeType == "ExpressionStatement": expr = fn_node[-1].expression - if expr.nodeType == "FunctionCall" and expr.expression.name == "revert": + + if expr.nodeType == "FunctionCall" and expr.get("expression.name") == "revert": pc_list[-1].update( path=source_node.absolutePath, fn=fn_name, offset=expr.expression.offset ) @@ -486,7 +487,10 @@ def _find_revert_offset( def _set_invalid_error_string(source_node: NodeBase, pc_map: Dict) -> None: # set custom error string for INVALID opcodes - node = source_node.children(include_children=False, offset_limits=pc_map["offset"])[0] + try: + node = source_node.children(include_children=False, offset_limits=pc_map["offset"])[0] + except IndexError: + return if node.nodeType == "IndexAccess": pc_map["dev"] = "Index out of range" elif node.nodeType == "BinaryOperation": diff --git a/docs/conf.py b/docs/conf.py index d1de400b7..465aa0d53 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,7 @@ def setup(sphinx): # The short X.Y version version = "" # The full version, including alpha/beta/rc tags -release = "v1.6.6" +release = "v1.6.7" # -- General configuration --------------------------------------------------- diff --git a/requirements.txt b/requirements.txt index faebab05e..ced240d7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ hypothesis==5.5.4 psutil>=5.7.0,<6.0.0 py>=1.5.0 pyreadline==2.1;platform_system=='Windows' -py-solc-ast>=1.1.0,<2.0.0 +py-solc-ast>=1.2.1,<2.0.0 py-solc-x>=0.8.0,<1.0.0 pytest==5.3.5 pytest-xdist==1.31.0 diff --git a/setup.cfg b/setup.cfg index 1f493517d..821e8905b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.6.6 +current_version = 1.6.7 [bumpversion:file:setup.py] diff --git a/setup.py b/setup.py index a12ce0a69..a221fd08d 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name="eth-brownie", packages=find_packages(), - version="1.6.6", # don't change this manually, use bumpversion instead + version="1.6.7", # don't change this manually, use bumpversion instead license="MIT", description="A Python framework for Ethereum smart contract deployment, testing and interaction.", # noqa: E501 long_description=long_description,