get_logs
Signature
get_logs(computation=None, include_child_logs=True) -> List[Event]
Description
Returns the logs generated by the computation.
computation: The computation to get the logs for. If None, uses the last computation.
include_child_logs: Whether to include logs from child computations.
- Returns: A list of
Event instances.
Examples
>>> import boa
>>> src = """
... @external
... def main():
... log MyEvent()
... """
>>> deployer = boa.loads_partial(src, name="Foo")
>>> contract = deployer.deploy()
>>> contract.main()
>>> contract.get_logs()
[<Event ...>]