MCPcopy Create free account
hub / github.com/enviodev/hypersync-client-python / test_decode_events

Function test_decode_events

test.py:220–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218
219
220async def test_decode_events():
221 client = make_client()
222 res = await client.get_events(QUERY)
223 decoder = hypersync.Decoder(
224 ["Transfer(address indexed from, address indexed to, uint256 value)"]
225 )
226 total_time = 0
227 for _ in range(NUM_BENCHMARK_RUNS):
228 start_time = time.time()
229 decoder.decode_events_sync(res.data)
230 execution_time = (time.time() - start_time) * 1000
231 total_time += execution_time
232 print(f"decode_events time: {format(execution_time, '.9f')}ms")
233
234
235async def test_preset_query_blocks_and_transactions():

Callers 1

mainFunction · 0.85

Calls 3

decode_events_syncMethod · 0.95
make_clientFunction · 0.85
get_eventsMethod · 0.45

Tested by

no test coverage detected