From 4085cf6427edfeb51d257c753aad290e5f30dd03 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Sun, 19 Nov 2023 23:00:05 +0000 Subject: [PATCH 1/3] Change configuration (#1823) * Change configuration * Downgrade solcx --- mythril/interfaces/cli.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mythril/interfaces/cli.py b/mythril/interfaces/cli.py index 38afbc36..1cb5f479 100644 --- a/mythril/interfaces/cli.py +++ b/mythril/interfaces/cli.py @@ -500,7 +500,7 @@ def add_analysis_args(options): options.add_argument( "--execution-timeout", type=int, - default=86400, + default=3600, help="The amount of seconds to spend on symbolic execution", ) options.add_argument( diff --git a/requirements.txt b/requirements.txt index 0cc87e03..90f4339f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ numpy persistent>=4.2.0 py-flags py-evm==0.7.0a1 -py-solc-x +py-solc-x<2.0.0 py-solc pytest>=3.6.0 pyparsing<3,>=2.0.2 From 960377f5cdd148dc6c6834879fc6b23518b8d477 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Sun, 19 Nov 2023 23:00:33 +0000 Subject: [PATCH 2/3] Mythril v0.24.3 --- mythril/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythril/__version__.py b/mythril/__version__.py index 5170c2cb..d0724248 100644 --- a/mythril/__version__.py +++ b/mythril/__version__.py @@ -4,4 +4,4 @@ This file is suitable for sourcing inside POSIX shell, e.g. bash as well as for importing into Python. """ -__version__ = "v0.24.2" +__version__ = "v0.24.3" From 460e9da50cb10a929ba0734cd01f7354482a8bad Mon Sep 17 00:00:00 2001 From: Santala <31094102+tranhoaison@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:27:03 +0700 Subject: [PATCH 3/3] fix typos (#1824) --- mythril/analysis/issue_annotation.py | 2 +- mythril/laser/ethereum/cfg.py | 2 +- mythril/laser/ethereum/natives.py | 2 +- mythril/laser/ethereum/svm.py | 2 +- mythril/laser/ethereum/transaction/transaction_models.py | 2 +- mythril/laser/plugin/plugins/mutation_pruner.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mythril/analysis/issue_annotation.py b/mythril/analysis/issue_annotation.py index 3d8e849b..7f5f431b 100644 --- a/mythril/analysis/issue_annotation.py +++ b/mythril/analysis/issue_annotation.py @@ -9,7 +9,7 @@ from copy import deepcopy class IssueAnnotation(StateAnnotation): def __init__(self, conditions: List[Bool], issue: Issue, detector): """ - Issue Annotation to propogate issues + Issue Annotation to propagate issues - conditions: A list of independent conditions [a, b, c, ...] Each of these have to be independently be satisfied - issue: The issue of the annotation diff --git a/mythril/laser/ethereum/cfg.py b/mythril/laser/ethereum/cfg.py index e7456e11..2317b5d3 100644 --- a/mythril/laser/ethereum/cfg.py +++ b/mythril/laser/ethereum/cfg.py @@ -79,7 +79,7 @@ class Node: class Edge: - """The respresentation of a call graph edge.""" + """The representation of a call graph edge.""" def __init__( self, diff --git a/mythril/laser/ethereum/natives.py b/mythril/laser/ethereum/natives.py index 8f920e99..7c8d9f75 100644 --- a/mythril/laser/ethereum/natives.py +++ b/mythril/laser/ethereum/natives.py @@ -94,7 +94,7 @@ def ecrecover(data: List[int]) -> List[int]: try: pub = ecrecover_to_pub(message, v, r, s) except Exception as e: - log.debug("An error has occured while extracting public key: " + str(e)) + log.debug("An error has occurred while extracting public key: " + str(e)) return [] o = [0] * 12 + [x for x in sha3(pub)[-20:]] return list(bytearray(o)) diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index d1b9fffe..0b3e3891 100644 --- a/mythril/laser/ethereum/svm.py +++ b/mythril/laser/ethereum/svm.py @@ -711,7 +711,7 @@ class LaserEVM: self.instr_post_hook[opcode].append(hook) def instr_hook(self, hook_type, opcode) -> Callable: - """Registers the annoted function with register_instr_hooks + """Registers the annotated function with register_instr_hooks :param hook_type: Type of hook pre/post :param opcode: The opcode related to the function diff --git a/mythril/laser/ethereum/transaction/transaction_models.py b/mythril/laser/ethereum/transaction/transaction_models.py index c75ad31c..c6726121 100644 --- a/mythril/laser/ethereum/transaction/transaction_models.py +++ b/mythril/laser/ethereum/transaction/transaction_models.py @@ -1,4 +1,4 @@ -"""This module contians the transaction models used throughout LASER's symbolic +"""This module contains the transaction models used throughout LASER's symbolic execution.""" from copy import deepcopy diff --git a/mythril/laser/plugin/plugins/mutation_pruner.py b/mythril/laser/plugin/plugins/mutation_pruner.py index 62442170..6a8b86fe 100644 --- a/mythril/laser/plugin/plugins/mutation_pruner.py +++ b/mythril/laser/plugin/plugins/mutation_pruner.py @@ -47,7 +47,7 @@ class MutationPruner(LaserPlugin): global_state.annotate(MutationAnnotation()) """FIXME: Check for changes in world_state.balances instead of adding MutationAnnotation for all calls. - Requires world_state.starting_balances to be initalized at every tx start *after* call value has been added. + Requires world_state.starting_balances to be initialized at every tx start *after* call value has been added. """ @symbolic_vm.pre_hook("CALL")