A manifest serves as the YAML configuration file for a given indexer. A proper manifest has the following structure:
namespace: fuel identifier: index1 abi: path/to/my/contract-abi.json contract_id: "0x39150017c9e38e5e280432d546fae345d6ce6d8fe4710162c2e3a95a6faff051" graphql_schema: path/to/my/schema.graphql start_block: 1564 module: wasm: path/to/my/wasm_module.wasm report_metrics: true
namespace is the topmost organizational level of an indexer. You can think of different namespaces as separate and distinct collections comprised of indexers. A namespace is unique to a given indexer operator -- i.e., indexer operators will not be able to support more than one namespace of the same name.
identifier field is used to (quite literally) identify the given indexer. If a namespace describes a collection of indexers, then an identifier describes a unique indexer inside that collection. As an example, if a provided
"fuel" and a provided
"index1", then the full identifier for the given indexer will be
abi option is used to provide a link to the Sway JSON application binary interface (ABI) that is generated when you build your Sway project. This generated ABI contains all types, type IDs, logged types, and message types used in your Sway contract.
contract_id specifies the particular contract to which you would like an indexer to subscribe. Setting this field to an empty string will index events from any contract that is currently executing on the network.
Important: Contract IDs are unique to the content of a contract. If you are subscribing to a certain contract and then the contract itself is changed or updated, you will need to change the
contract_idfield of the manifest to the new ID.
graphql_schema field contains the file path pointing to the corresponding GraphQL schema for a given indexer. This schema file holds the structures of the data that will eventually reside in your database. You can read more about the format of the schema file here.
Important: The objects defined in your GraphQL schema are called 'entities'. These entities are what will be eventually be stored in the database.
start_block field indicates the block height after which you'd like your indexer to start indexing events.
module field contains a file path that points to code that will be run as an executor inside of the indexer. There are two available options for modules/execution:
native. Note that when specifying a
wasm module, the provided path must lead to a compiled WASM binary.
Important: At this time,
wasmis the preferred method of execution.
report_metrics field indicates whether to report Prometheus metrics to the Fuel backend.
resumable field contains a boolean value and specifies whether the indexer should synchronise with the latest block if it has fallen out of sync.