Skip to main content
Version: 2.0.1

dex

DexInterface Objects

class DexInterface(ABC)

DexInterface The DexInterface can be used to standardize the interface of a DEX protocol

__init__

@abstractmethod
def __init__(contracts: list[ContractInterface], tokens: list[TokenInterface],
settings: dict, metric_helper: MetricHelperInterface)

Initialize the Dex protocol

Arguments:


  • contracts List[ContractInterface] - Contracts to be used in the protocol, specified in the configuration
  • tokens List[TokenInterface] - Tokens to be used in the protocol, all tokens for the environment will be passed
  • settings dict - Settings for the protocol, specified in the configuration
  • metric_helper MetricHelperInterface - MetricHelper to be used for the protocol to log metrics

initialize

@abstractmethod
def initialize(agent_addresses: list[str])

Initialize the Dex protocol

Arguments:


  • agent_addresses List[str] - List of agent addresses that will be using the protocol