Configuration

The configuration for Dappetizer can be specified as a JavaScript or JSON file format. The file name is implicitly dappetizer.config.ts, dappetizer.config.js, dappetizer.config.json, or it can also be passed as a command-line parameter.

Reference

Available configuration properties are documented in API docs on type DappetizerConfigUsingDb or DappetizerConfig.

Example configuration file

import { DappetizerConfigUsingDb } from '@tezos-dappetizer/database';

const config: DappetizerConfigUsingDb = {
    modules: [
        {
            id: './my-indexer-module.js',
            config: { foo: 123 }, 
        },
    ],
    networks: {
        mainnet: {
            indexing: {
                fromBlockLevel: 1268684,
                contracts: [{
                    addresses: ['KT191reDVKrLxU9rjTSxg53wRqj6zh8pnHgr'],
                    name: 'MyContract',
                }],
            },
            tezosNode: {
                url: 'https://mainnet-tezos.giganode.io',
            },
        },
        testnet: {
            indexing: {
                fromBlockLevel: 858123,
                contracts: [{
                    addresses: ['KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5'],
                    name: 'MyContract',
                }],
            },
            tezosNode: {
                url: 'https://testnet-tezos.giganode.io',
            },
        },
    },
    database: {
        type: 'postgres',
        host: 'localhost',
        port: 5432,
        username: 'postgres',
        password: '***',
        database: 'postgres',
        schema: 'my_indexer',
    },
};

export default config;

Last updated