From 65bcca8b7d3922a3026ca213636af1a79bdcecc3 Mon Sep 17 00:00:00 2001 From: Gustavo Grieco <31542053+ggrieco-tob@users.noreply.github.com> Date: Mon, 30 Nov 2020 14:42:38 -0300 Subject: [PATCH 1/2] Enable the generation of erc20 properies with BUIDLER --- slither/tools/properties/properties/erc20.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slither/tools/properties/properties/erc20.py b/slither/tools/properties/properties/erc20.py index fce92346a..8289ffe21 100644 --- a/slither/tools/properties/properties/erc20.py +++ b/slither/tools/properties/properties/erc20.py @@ -75,6 +75,7 @@ def generate_erc20( if contract.slither.crytic_compile.type not in [ PlatformType.TRUFFLE, PlatformType.SOLC, + PlatformType.BUILDER ]: logging.error(f"{contract.slither.crytic_compile.type} not yet supported by slither-prop") return @@ -153,7 +154,7 @@ def _initialization_recommendation(type_property: str) -> str: # TODO: move this to crytic-compile def _platform_to_output_dir(platform: AbstractPlatform) -> Path: - if platform.TYPE == PlatformType.TRUFFLE: + if platform.TYPE == PlatformType.TRUFFLE or platform.TYPE == PlatformType.BUILDER: return Path(platform.target, "contracts", "crytic") if platform.TYPE == PlatformType.SOLC: return Path(platform.target).parent From b28748087d4d4a26df9edb2a56bcfdceeac4ac8b Mon Sep 17 00:00:00 2001 From: Gustavo Grieco <31542053+ggrieco-tob@users.noreply.github.com> Date: Mon, 30 Nov 2020 15:21:31 -0300 Subject: [PATCH 2/2] Update erc20.py --- slither/tools/properties/properties/erc20.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/tools/properties/properties/erc20.py b/slither/tools/properties/properties/erc20.py index 8289ffe21..6e06fbddd 100644 --- a/slither/tools/properties/properties/erc20.py +++ b/slither/tools/properties/properties/erc20.py @@ -75,7 +75,7 @@ def generate_erc20( if contract.slither.crytic_compile.type not in [ PlatformType.TRUFFLE, PlatformType.SOLC, - PlatformType.BUILDER + PlatformType.BUILDER, ]: logging.error(f"{contract.slither.crytic_compile.type} not yet supported by slither-prop") return