Skip to main content

Manifest

Manifest

The Manifest class serves as the central configuration for your Arkive, allowing you to define data sources from various blockchains, map them to their respective handler functions, and set up your database schema using entity classes. By chaining method calls, you can create a comprehensive, easy-to-read manifest that outlines your entire Arkive configuration.

Example manifest

manifest.ts
import { Manifest } from "https://deno.land/x/robo_arkiver/mod.ts";
import erc20 from "./abis/erc20.ts";
import { Transfer } from "./entities/transfer.ts";
import { transferHandler } from "./handlers/transferHandler.ts";

const manifest = new Manifest("my-arkive");

manifest
.addEntity(Transfer)
.chain("mainnet", { blockRange: 100n })
.addContract({
abi: erc20,
name: 'ERC20',
sources: {
'0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f': 17736650n,
},
eventHandlers: {
Transfer: transferHandler,
},
})

export default manifest.build();