From 82dce8ac47725453bd64bc6ee59476ff09ff27c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 16 Dec 2022 10:53:37 -0300 Subject: [PATCH 1/3] cryticparser: add missing brownie and foundry arguments --- crytic_compile/cryticparser/cryticparser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crytic_compile/cryticparser/cryticparser.py b/crytic_compile/cryticparser/cryticparser.py index b0126e20..e67932c0 100755 --- a/crytic_compile/cryticparser/cryticparser.py +++ b/crytic_compile/cryticparser/cryticparser.py @@ -53,6 +53,7 @@ def init(parser: ArgumentParser) -> None: _init_solc(parser) _init_truffle(parser) _init_embark(parser) + _init_brownie(parser) _init_dapp(parser) _init_etherlime(parser) _init_etherscan(parser) @@ -60,6 +61,7 @@ def init(parser: ArgumentParser) -> None: _init_npx(parser) _init_buidler(parser) _init_hardhat(parser) + _init_foundry(parser) def _init_solc(parser: ArgumentParser) -> None: From 69cf42c3f220d6636f649614173bc7ba2296795e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 16 Dec 2022 11:00:19 -0300 Subject: [PATCH 2/3] cryticparser: rename misleading variables Some group variables had misleading names, probably due to code duplication. --- crytic_compile/cryticparser/cryticparser.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crytic_compile/cryticparser/cryticparser.py b/crytic_compile/cryticparser/cryticparser.py index e67932c0..aed26944 100755 --- a/crytic_compile/cryticparser/cryticparser.py +++ b/crytic_compile/cryticparser/cryticparser.py @@ -16,11 +16,11 @@ def init(parser: ArgumentParser) -> None: parser (ArgumentParser): argparser where the cli flags are added """ - group_solc = parser.add_argument_group("Compile options") + group_compile = parser.add_argument_group("Compile options") platforms = get_platforms() - group_solc.add_argument( + group_compile.add_argument( "--compile-force-framework", help="Force the compile to a given framework " f"({','.join([x.NAME.lower() for x in platforms])})", @@ -28,21 +28,21 @@ def init(parser: ArgumentParser) -> None: default=DEFAULTS_FLAG_IN_CONFIG["compile_force_framework"], ) - group_solc.add_argument( + group_compile.add_argument( "--compile-remove-metadata", help="Remove the metadata from the bytecodes", action="store_true", default=DEFAULTS_FLAG_IN_CONFIG["compile_remove_metadata"], ) - group_solc.add_argument( + group_compile.add_argument( "--compile-custom-build", help="Replace platform specific build command", action="store", default=DEFAULTS_FLAG_IN_CONFIG["compile_custom_build"], ) - group_solc.add_argument( + group_compile.add_argument( "--ignore-compile", help="Do not run compile of any platform", action="store_true", @@ -232,8 +232,8 @@ def _init_brownie(parser: ArgumentParser) -> None: Args: parser (ArgumentParser): argparser where the cli flags are added """ - group_embark = parser.add_argument_group("Brownie options") - group_embark.add_argument( + group_brownie = parser.add_argument_group("Brownie options") + group_brownie.add_argument( "--brownie-ignore-compile", help="Do not run brownie compile", action="store_true", @@ -465,8 +465,8 @@ def _init_foundry(parser: ArgumentParser) -> None: Args: parser (ArgumentParser): argparser where the cli flags are added """ - group_hardhat = parser.add_argument_group("foundry options") - group_hardhat.add_argument( + group_foundry = parser.add_argument_group("foundry options") + group_foundry.add_argument( "--foundry-ignore-compile", help="Do not run foundry compile", action="store_true", @@ -474,7 +474,7 @@ def _init_foundry(parser: ArgumentParser) -> None: default=DEFAULTS_FLAG_IN_CONFIG["foundry_ignore_compile"], ) - group_hardhat.add_argument( + group_foundry.add_argument( "--foundry-out-directory", help="Use an alternative out directory (default: out)", action="store", From cb067dd381fe61dfafcb0994518b24a89245eb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 16 Dec 2022 11:02:04 -0300 Subject: [PATCH 3/3] cryticparser: start names with caps --- crytic_compile/cryticparser/cryticparser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crytic_compile/cryticparser/cryticparser.py b/crytic_compile/cryticparser/cryticparser.py index aed26944..de29ed6e 100755 --- a/crytic_compile/cryticparser/cryticparser.py +++ b/crytic_compile/cryticparser/cryticparser.py @@ -433,7 +433,7 @@ def _init_hardhat(parser: ArgumentParser) -> None: Args: parser (ArgumentParser): argparser where the cli flags are added """ - group_hardhat = parser.add_argument_group("hardhat options") + group_hardhat = parser.add_argument_group("Hardhat options") group_hardhat.add_argument( "--hardhat-ignore-compile", help="Do not run hardhat compile", @@ -465,7 +465,7 @@ def _init_foundry(parser: ArgumentParser) -> None: Args: parser (ArgumentParser): argparser where the cli flags are added """ - group_foundry = parser.add_argument_group("foundry options") + group_foundry = parser.add_argument_group("Foundry options") group_foundry.add_argument( "--foundry-ignore-compile", help="Do not run foundry compile",