You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results returned from handlers are currently intended to be stored in a DB (from docs), but it would be great to also see these results in console logs as the bot is running.
Specification
Using example.py, potentially log what would be stored in a results DB to the console. So, the event handler
# This is how we trigger off of events# Set new_block_timeout to adjust the expected block time.@app.on_(USDC.Transfer, start_block=18588777, new_block_timeout=25)# NOTE: Typing isn't requireddefexec_event1(log):
iflog.log_index%7==3:
# If you ever want the app to shutdown under some scenario, call this exceptionraiseCircuitBreaker("Oopsie!")
return {"amount": log.amount}
would log {"amount": log.amount} for each log handled.
The text was updated successfully, but these errors were encountered:
@0xcivita do you have an example usecase of why this specifically should be displayed in the logs? Or are you more generally looking to view live datapoints from your bot similar to as described in #59?
Overview
Results returned from handlers are currently intended to be stored in a DB (from docs), but it would be great to also see these results in console logs as the bot is running.
Specification
Using
example.py
, potentially log what would be stored in a results DB to the console. So, the event handlerwould log
{"amount": log.amount}
for each log handled.The text was updated successfully, but these errors were encountered: