/ examples / parquet / starknet_to_parquet.js
starknet_to_parquet.js
 1  // See README.md for instructions.
 2  import { decodeTransfersInBlock, filter } from "../common/starknet.js";
 3  
 4  // Configure indexer for streaming Starknet Goerli data starting at the specified block.
 5  export const config = {
 6    streamUrl: "https://goerli.starknet.a5a.ch",
 7    startingBlock: 800_000,
 8    network: "starknet",
 9    filter,
10    sinkType: "parquet",
11    sinkOptions: {
12      // Files will have data for 100 blocks each.
13      // In reality, you want this number to be higher (like 1_000),
14      // but for the sake of this example, we keep it low to generate
15      // files quickly.
16      batchSize: 100,
17    },
18  };
19  
20  // Transform each block using the function defined in starknet.js.
21  export default decodeTransfersInBlock;