implement basic plugin factory

pull/980/head
Joran Honig 6 years ago
parent ba917ec5d6
commit d9f4eac795
  1. 18
      mythril/laser/ethereum/plugins/plugin_factory.py

@ -0,0 +1,18 @@
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
class PluginFactory:
""" The plugin factory constructs the plugins provided with laser """
@staticmethod
def build_benchmark_plugin(name: str) -> LaserPlugin:
""" Creates an instance of the benchmark plugin with the given name """
return BenchmarkPlugin(name)
@staticmethod
def build_mutation_pruner_plugin() -> LaserPlugin:
""" Creates an instance of the mutation pruner plugin"""
return MutationPruner()
Loading…
Cancel
Save