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
Sign in to the Chaintable console and open your 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. Run the Pipeline
In Notebooks, create backfill_usdc_transfers and enter the following code. Replace SPACE with your Space ID:
The code processes data as follows:
Trigger selects USDC Transfer events.
SOURCE_ROW passes each selected event to the function.
parse_usdc_transfer extracts the sender, recipient, and amount from decoded params.
- The Pipeline writes returned records to the transfer table specified by
target_table.
This example defines the function directly in the Notebook. You can also set func to an existing Function ID.
Run the backfill
Save and click Run. View progress and results in Output.
backfill() processes the specified 10 blocks, including both boundary heights, then exits.
3. 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.
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.