web3research.eth.EthereumProvider
- class web3research.eth.EthereumProvider(api_token, backend: str | None = None, database: str = 'ethereum', settings: Dict[str, Any] | None = None, generic_args: Dict[str, Any] | None = None, **kwargs)
Bases:
web3research.db.ClickhouseProviderEthereumProvider is a provider for fetching data on Ethereum from the backend.
- Parameters:
backend (Optional[str])
database (str)
settings (Optional[Dict[str, Any]])
generic_args (Optional[Dict[str, Any]])
- database = 'ethereum'
- blocks(where: str | None, order_by: Dict[str, bool] | None = {'number': True}, limit: int | None = 100, offset: int | None = 0, parameters: Dict[str, Any] | None = None) Generator[Dict[str, Any], None, None]
Get blocks from the database.
- Args:
where (str): The WHERE clause. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to number ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None.
- Returns:
Generator[Dict[str, Any], None, None]: A generator of blocks.
- Parameters:
where (Optional[str])
order_by (Optional[Dict[str, bool]])
limit (Optional[int])
offset (Optional[int])
parameters (Optional[Dict[str, Any]])
- Return type:
Generator[Dict[str, Any], None, None]
- transactions(where: str | None, order_by: Dict[str, bool] | None = {'blockNumber': True, 'transactionIndex': True}, limit: int | None = 100, offset: int | None = 0, parameters: Dict[str, Any] | None = None) Generator[Dict[str, Any], None, None]
Get transactions from the database.
- Args:
where (str): The WHERE clause. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockNumber and transactionIndex ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None.
- Returns:
Generator[Dict[str, Any], None, None]: A generator of transactions.
- Parameters:
where (Optional[str])
order_by (Optional[Dict[str, bool]])
limit (Optional[int])
offset (Optional[int])
parameters (Optional[Dict[str, Any]])
- Return type:
Generator[Dict[str, Any], None, None]
- traces(where: str | None, order_by: Dict[str, bool] | None = {'blockNumber': True, 'blockPos': True}, limit: int | None = 100, offset: int | None = 0, parameters: Dict[str, Any] | None = None) Generator[Dict[str, Any], None, None]
Get traces from the database.
- Args:
where (str): The WHERE clause. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockNumber and blockPos ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None.
- Returns:
Generator[Dict[str, Any], None, None]: A generator of traces.
- Parameters:
where (Optional[str])
order_by (Optional[Dict[str, bool]])
limit (Optional[int])
offset (Optional[int])
parameters (Optional[Dict[str, Any]])
- Return type:
Generator[Dict[str, Any], None, None]
- events(where: str | None, order_by: Dict[str, bool] | None = {'blockNumber': True, 'transactionIndex': True, 'logIndex': True}, limit: int | None = 100, offset: int | None = 0, parameters: Dict[str, Any] | None = None) Generator[Dict[str, Any], None, None]
Get events from the database.
- Args:
where (str): The WHERE clause. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockNumber, transactionIndex, and logIndex ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None.
- Returns:
Generator[Dict[str, Any], None, None]: A generator of events.
- Parameters:
where (Optional[str])
order_by (Optional[Dict[str, bool]])
limit (Optional[int])
offset (Optional[int])
parameters (Optional[Dict[str, Any]])
- Return type:
Generator[Dict[str, Any], None, None]