|
|
@ -1,11 +1,4 @@ |
|
|
|
from mythril.laser.ethereum.plugins.plugin import LaserPlugin |
|
|
|
from mythril.laser.ethereum.plugins.plugin import LaserPlugin |
|
|
|
from mythril.laser.ethereum.plugins.implementations.benchmark import BenchmarkPlugin |
|
|
|
|
|
|
|
from mythril.laser.ethereum.plugins.implementations.mutation_pruner import ( |
|
|
|
|
|
|
|
MutationPruner, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
from mythril.laser.ethereum.plugins.implementations.coverage import ( |
|
|
|
|
|
|
|
InstructionCoveragePlugin, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PluginFactory: |
|
|
|
class PluginFactory: |
|
|
@ -14,14 +7,26 @@ class PluginFactory: |
|
|
|
@staticmethod |
|
|
|
@staticmethod |
|
|
|
def build_benchmark_plugin(name: str) -> LaserPlugin: |
|
|
|
def build_benchmark_plugin(name: str) -> LaserPlugin: |
|
|
|
""" Creates an instance of the benchmark plugin with the given name """ |
|
|
|
""" Creates an instance of the benchmark plugin with the given name """ |
|
|
|
|
|
|
|
from mythril.laser.ethereum.plugins.implementations.benchmark import ( |
|
|
|
|
|
|
|
BenchmarkPlugin, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
return BenchmarkPlugin(name) |
|
|
|
return BenchmarkPlugin(name) |
|
|
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
@staticmethod |
|
|
|
def build_mutation_pruner_plugin() -> LaserPlugin: |
|
|
|
def build_mutation_pruner_plugin() -> LaserPlugin: |
|
|
|
""" Creates an instance of the mutation pruner plugin""" |
|
|
|
""" Creates an instance of the mutation pruner plugin""" |
|
|
|
|
|
|
|
from mythril.laser.ethereum.plugins.implementations.mutation_pruner import ( |
|
|
|
|
|
|
|
MutationPruner, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
return MutationPruner() |
|
|
|
return MutationPruner() |
|
|
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
@staticmethod |
|
|
|
def build_instruction_coverage_plugin() -> LaserPlugin: |
|
|
|
def build_instruction_coverage_plugin() -> LaserPlugin: |
|
|
|
""" Creates an instance of the instruction coverage plugin""" |
|
|
|
""" Creates an instance of the instruction coverage plugin""" |
|
|
|
|
|
|
|
from mythril.laser.ethereum.plugins.implementations.coverage import ( |
|
|
|
|
|
|
|
InstructionCoveragePlugin, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
return InstructionCoveragePlugin() |
|
|
|
return InstructionCoveragePlugin() |
|
|
|