strategy.strategy_factory
importlib
traceback
Path
pprint
Chain
Network
Strategy
get_web3_by_network_and_chain
STRATEGY_DIRECTORY
StrategyFactory Objects
class StrategyFactory()
strategies
register_strategies
@staticmethod
def register_strategies()
create_strategy
@staticmethod
def create_strategy(strategy_name, parameters)
get_strategies
@staticmethod
def get_strategies()
get_parameters_from_config
def get_parameters_from_config(config: dict,
strategy_id: str,
verbose: bool = True) -> dict
create_strategy_from_config
def create_strategy_from_config(config: dict, strategy_id: str) -> Strategy
Extracts shared and specific strategy configuration, merges shared parameters with specific parameters for the strategy corresponding to the strategy_id received, and create the strategy instance using the StrategyFactory.
Returns:
Strategy instance (or None if the strategy_id is not found).
get_strategy_ids_from_config
def get_strategy_ids_from_config(config: dict) -> list[str]