Watch Now: Learn more by watching our video Web3 Function Triggers, available on YouTube.
Event Context
For event triggered typescript functions, use theWeb3FunctionEventContext instead of the regular Web3FunctionContext on your onRun handler.
The context will then include a log property containing your full event log that you can parse and process.
Event Triggered Typescript Function example
event/index.ts
Testing locally
To test your event triggered typescript function, you can add alog.json file in your web3 function directory:

log.json file the raw data of the event you want to test:
event/log.json
log.json will be injected in your event context in local runs via CLI: