hypermanager-py
is an orchestration manager built ontop of the hypersync python client. It makes cross-chain log queries easy to manage and works with blocks and transactions data as well.
Install with pip install hypermanager
. The repository is built with Python 3.12.5. You can easily make a virtual environment for this python version by using rye for virtual environment management.
There is an example that retrieves all log events from the Across Protocol bridging. The example is located in the examples
directory. Run the example with python examples/across/spoke_pool_v3.py
to see how to execute a multi-chain events query.
The EventConfig class is a key component of the HyperManager framework, designed to facilitate efficient querying and processing of blockchain events across various protocols. It encapsulates event details, enables dynamic querying, and specifies data mapping. Contributions are welcome to enhance the framework's capabilities and ensure comprehensive data coverage for cross chain events:
@dataclass
class EventConfig:
name: str
signature: str
contract: Optional[str] = None
column_mapping: Optional[hypersync.ColumnMapping] = None
- name: Human-readable event name
- signature: Unique event signature
- contract: (Optional) Associated contract address
- column_mapping: (Optional) Defines transaction and block data processing1
- Understand the event structure (name, signature, contract address, decoded log fields)
- Create an EventConfig instance
- Ensure consistency in data types
- Add the event to the configuration dictionary and submit a pull request (optional)