Source code for genlayer.gl.advanced
"""
This module provides some "advanced" features that can be used for optimizations
.. warning::
If you are using something "advanced" you must know what you do
"""
__all__ = (
'user_error_immediate',
'emit_raw_event',
)
import typing
import genlayer.py.calldata as calldata
import collections.abc
import genlayer.gl._internal.gl_call as gl_call
[docs]
def emit_raw_event(
topics: list[bytes],
blob: calldata.Encodable,
) -> None:
"""
Emits a raw event with the given name, indexed fields and blob of data.
"""
gl_call.gl_call_generic(
{
'EmitEvent': {
'topics': topics,
'blob': blob,
}
},
lambda _x: None,
).get()