Command Line
Dappetizer provides a command-line interface that can run the indexer or handle the scaffolding of Dappetizer projects. It can be invoked using NPX or directly if installed globally.
Available commands and their options are following.
init
Generates a new Dappetizer app using TypeScript, optionally with code for indexing a given contract.
[contractAddress]
The address of the contract for which indexer code should be generated.
--contractName
The name of the contract used for naming generated code.
If not specified, then the name from TZIP-16 metadata is used, then the
MyContract
constant.
--indexerModule
The name of the indexer module to generate.
If not specified, then the
MyModule
constant is used.
--network
The Tezos network where the contract resides. It is used to determine
--tezosEndpoint
if it is not specified.Default value:
mainnet
Choices (may vary depending on Dappetizer version):
mainnet
,hangzhounet
.
--tezosEndpoint
The URL of the Tezos Node to be used to fetch contract details.
If not specified, then it is determined from the
--network
option.
--outDir
The relative or absolute path of the directory where the indexer code should be generated.
Default value:
.
--npmInstall
Instructs the generator to (not) install dependent Node.js modules.
Default value:
true
start
Starts the indexing according to the config file.
[configFile]
The explicit path of the configuration file.
If not specified, then these files in current working directory are checked:
dappetizer.local.config.ts
dappetizer.local.config.js
dappetizer.local.config.json
dappetizer.config.ts
dappetizer.config.js
dappetizer.config.json
--network
The Tezos network that should be indexed. It is used to select respective part of
networks
Dappetizer configuration.Default value:
mainnet
update
Updates (re-generates) already generated contract indexer class corresponding to the specified name to be according to the schema of the specified contract address.
<contractName>
The name of the contract used for naming already generated indexer code. For example
FooBar
will update the filesrc/foo-bar-indexer-base.generated.ts
within--outDir
.
<contractAddress>
The address of the contract for which indexer code should be generated.
--network
The Tezos network where the contract resides. It is used to determine
--tezosEndpoint
if it is not specified.Default value:
mainnet
Choices (may vary depending on Dappetizer version):
mainnet
,hangzhounet
.
--tezosEndpoint
The URL of the Tezos Node to be used to fetch contract details.
If not specified, then it is determined from the
--network
option.
--outDir
The relative or absolute path of the directory where the indexer code should be generated.
Default value:
.
Last updated