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

TypeScript
JavaScript
JSON
1
import { DappetizerConfigUsingDb } from '@tezos-dappetizer/database';
2
3
const config: DappetizerConfigUsingDb = {
4
modules: [
5
{
6
id: './my-indexer-module.js',
7
config: { foo: 123 },
8
},
9
],
10
networks: {
11
mainnet: {
12
indexing: {
13
fromBlockLevel: 1268684,
14
contracts: [{
15
addresses: ['KT191reDVKrLxU9rjTSxg53wRqj6zh8pnHgr'],
16
name: 'MyContract',
17
}],
18
},
19
tezosNode: {
20
url: 'https://mainnet-tezos.giganode.io',
21
},
22
},
23
testnet: {
24
indexing: {
25
fromBlockLevel: 858123,
26
contracts: [{
27
addresses: ['KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5'],
28
name: 'MyContract',
29
}],
30
},
31
tezosNode: {
32
url: 'https://testnet-tezos.giganode.io',
33
},
34
},
35
},
36
database: {
37
type: 'postgres',
38
host: 'localhost',
39
port: 5432,
40
username: 'postgres',
41
password: '***',
42
database: 'postgres',
43
schema: 'my_indexer',
44
},
45
};
46
47
export default config;
Copied!
dappetizer.config.js
1
module.exports = {
2
modules: [
3
{
4
id: './my-indexer-module.js',
5
config: { foo: 123 },
6
},
7
],
8
networks: {
9
mainnet: {
10
indexing: {
11
fromBlockLevel: 1268684,
12
contracts: [{
13
addresses: ['KT191reDVKrLxU9rjTSxg53wRqj6zh8pnHgr'],
14
name: 'MyContract',
15
}],
16
},
17
tezosNode: {
18
url: 'https://mainnet-tezos.giganode.io',
19
},
20
},
21
testnet: {
22
indexing: {
23
fromBlockLevel: 858123,
24
contracts: [{
25
addresses: ['KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5'],
26
name: 'MyContract',
27
}],
28
},
29
tezosNode: {
30
url: 'https://testnet-tezos.giganode.io',
31
},
32
},
33
},
34
database: {
35
type: 'postgres',
36
host: 'localhost',
37
port: 5432,
38
username: 'postgres',
39
password: '***',
40
database: 'postgres',
41
schema: 'my_indexer',
42
},
43
};
Copied!
dappetizer.config.json
1
{
2
"modules": [
3
{
4
"id": "./my-indexer-module.js",
5
"config": { "foo": 123 }
6
},
7
],
8
"networks": {
9
"mainnet": {
10
"indexing": {
11
"fromBlockLevel": 1268684,
12
"contracts": [{
13
"addresses": ["KT191reDVKrLxU9rjTSxg53wRqj6zh8pnHgr"],
14
"name": "MyContract",
15
}],
16
},
17
"tezosNode": {
18
"url": "https://mainnet-tezos.giganode.io",
19
},
20
},
21
"testnet": {
22
"indexing": {
23
"fromBlockLevel": 858123,
24
"contracts": [{
25
"addresses": ["KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5"],
26
"name": "MyContract",
27
}],
28
},
29
"tezosNode": {
30
"url": "https://testnet-tezos.giganode.io",
31
},
32
},
33
},
34
"database": {
35
"type": "postgres",
36
"host": "localhost",
37
"port": 5432,
38
"username": "postgres",
39
"password": "***",
40
"database": "postgres",
41
"schema": "my_indexer"
42
}
43
}
Copied!