mythril.laser.ethereum.strategy.extensions package¶
Submodules¶
mythril.laser.ethereum.strategy.extensions.bounded_loops module¶
-
class
mythril.laser.ethereum.strategy.extensions.bounded_loops.
BoundedLoopsStrategy
(super_strategy: mythril.laser.ethereum.strategy.BasicSearchStrategy, **kwargs)[source]¶ Bases:
mythril.laser.ethereum.strategy.BasicSearchStrategy
Adds loop pruning to the search strategy. Ignores JUMPI instruction if the destination was targeted >JUMPDEST_LIMIT times.
-
static
calculate_hash
(i: int, j: int, trace: List[int]) → int[source]¶ calculate hash(trace[i: j]) :param i: :param j: :param trace: :return: hash(trace[i: j])
-
static
count_key
(trace: List[int], key: int, start: int, size: int) → int[source]¶ Count continuous loops in the trace. :param trace: :param key: :param size: :return:
-
static
-
class
mythril.laser.ethereum.strategy.extensions.bounded_loops.
JumpdestCountAnnotation
[source]¶ Bases:
mythril.laser.ethereum.state.annotation.StateAnnotation
State annotation that counts the number of jumps per destination.