This tutorial builds an event table of USDC transfers on Ethereum mainnet, recording the sender, recipient, amount, and transaction hash.
chain.event.eth → Filter USDC Transfer events → Extract transfer fields → Transfer event table
Before you begin
Sign in to the Chaintable console. If you don’t have a Space yet, click New Space on the Spaces page, enter an Id, and click Create space.
Open your new or existing Space. This tutorial uses demo; replace it with your Space ID.
1. Create a transfer event table
In Tables, create a table named usdc_transfers, select Block Event, and choose Ethereum. The resulting table ID is demo.usdc_transfers.eth.
Add the following fields in Schema, keeping the system fields and other defaults:
2. Create a Function
In Functions, create parse_usdc_transfer and enter the following code:
Add an event parameter below the editor, select JSON as its type, and save the Function. For the steps, see Create a Function.
The Function extracts the sender, recipient, and amount from the event’s params and returns a record for the transfer table. The record also carries the event’s block fields, which larger backfills require; see Result handlers.
3. Run the Pipeline
In Notebooks, create backfill_usdc_transfers and enter the following code. Replace SPACE with your Space ID:
sources specifies the source table and saved Function. operator filters events, and ROW passes each source record as an argument. The Pipeline writes the Function’s returned records to target.
Run the backfill
Save and click Run. View progress and results in Output or Instance detail.
backfill() processes the specified 10 blocks, including both boundary heights, then exits.
4. View transfer data
Return to usdc_transfers.eth and check the processed blocks in Overview. This run backfills only a limited range; earlier history is still missing.
Open event under Subtables to view transfer records.
Each record uses the source event’s id. The Pipeline fills in block fields automatically.
amount retains the raw integer value. Divide it by 10^6 to get the USDC amount.
Optional: keep the table updated
Create a Notebook named update_usdc_transfers, copy the code above, and replace the final pipeline.backfill(...) line with the following call. Save and run:
By default, update() fills history from the earliest unfinished block, then keeps updating after reaching the latest block. If you only need data from a specific height onward, set the start height first.
For a large backlog, you can also run backfill() in another Notebook at the same time to speed up historical processing.
Select Switch to Background to run in the background. Cancel the instance in the account’s Instances page to stop it. Data already written is retained.