Quickstart
Create a Convect Function
In the preferred project, create a new Convect Function.
Initialise Convect
Initialise Convect in your project directory.
This will create a convect.config.mjs file in your root project directory.
You can read more about the Convect config file here.
Write your handler
The transaction API is used to define a handler for transactions that contain event logs that match all of the signatures specified in the logs property. When your Convect Function runs, it receives these transactions in batches (max 60 transactions per batch).
For the example below, the transfer handler will be called for all transactions that contain a Transfer log originating from the USDC contract.
You can read the API reference for detailed information on what you can do with the transaction API.
Export a Convect Function
The convect API is used to export a Convect Function. This ties all your handlers together. Handlers run in the order they are specified in the handlers array.
handlers array.Authenticate & Deploy
Authenticate with the command below.
Create a new deployment with the command below.
The new deployment should be available in the Projects page.