From d68abccc58ce03fc2a37ae0ee6258daff830c8a3 Mon Sep 17 00:00:00 2001 From: ra0x3 Date: Thu, 12 Oct 2023 10:27:35 -0400 Subject: [PATCH] manifest cleanup --- .../fuel-explorer/fuel_explorer.manifest.yaml | 19 ++++++++---- .../greetings_native_indexer.manifest.yaml | 16 +++++++--- .../greetings_indexer.manifest.yaml | 27 +++++++++++----- .../hello-world/hello_world.manifest.yaml | 31 ++++++++++--------- packages/fuel-indexer-lib/src/manifest.rs | 1 - 5 files changed, 61 insertions(+), 33 deletions(-) diff --git a/examples/fuel-explorer/fuel-explorer/fuel_explorer.manifest.yaml b/examples/fuel-explorer/fuel-explorer/fuel_explorer.manifest.yaml index 72d09b2b1..c165c2e03 100644 --- a/examples/fuel-explorer/fuel-explorer/fuel_explorer.manifest.yaml +++ b/examples/fuel-explorer/fuel-explorer/fuel_explorer.manifest.yaml @@ -2,12 +2,16 @@ # as an organization identifier namespace: fuellabs -# Unique identifier for this indexer. +# The identifier field is used to identify the given index. identifier: explorer - +# Indexer contract configuration. contracts: + + # File paths to the contract JSON ABIs that are generated when you build your Sway contracts. abis: ~ + + # Specifies which particular contracts you would like your indexer to subscribe to. subscriptions: ~ # The particular start block after which you'd like your indexer to start indexing events. @@ -22,10 +26,8 @@ end_block: ~ # with the `--indexer_net_config` option. fuel_client: ~ -# Specifies which particular contract(s) you would like your indexer to subscribe to. -contract_subscriptions: ~ - -# A file path that points to the GraphQL schema for the given indexer. +# The graphql_schema field contains the file path that points to the GraphQL schema for the +# given index. graphql_schema: examples/fuel-explorer/fuel-explorer/schema/fuel_explorer.schema.graphql # The module field contains a file path that points to code that will be run as an executor inside @@ -38,6 +40,11 @@ module: # with the latest block if it has fallen out of sync. resumable: true +# Indexer predicate configuration. predicates: + + # File paths to the predicate JSON ABI that is generated when you build your Sway predicates. abis: ~ + + # Template commitments (hashes) of the bytecode of predicates used by this indexer. templates: ~ diff --git a/examples/greetings-native/greetings-native-indexer/greetings_native_indexer.manifest.yaml b/examples/greetings-native/greetings-native-indexer/greetings_native_indexer.manifest.yaml index 2bd4dc7ac..511c5869c 100644 --- a/examples/greetings-native/greetings-native-indexer/greetings_native_indexer.manifest.yaml +++ b/examples/greetings-native/greetings-native-indexer/greetings_native_indexer.manifest.yaml @@ -5,13 +5,14 @@ namespace: fuellabs # The identifier field is used to identify the given index. identifier: greetings_native -# The abi option is used to provide a link to the Sway JSON ABI that is generated when you -# build your project. -contract_abi: examples/hello-world/contracts/greeting/out/debug/greeting-abi.json - +# Indexer contract configuration. contracts: + + # File paths to the contract JSON ABIs that are generated when you build your Sway contracts. abis: - - examples/hello-world/contracts/greeting/out/debug/greeting-abi.json + - examples/greetings/contracts/greeting/out/debug/greeting-abi.json + + # Specifies which particular contracts you would like your indexer to subscribe to. subscriptions: - fuel18hchrf7f4hnpkl84sqf8k0sk8gcauzeemzwgweea8dgr7eachv4s86r9t9 @@ -40,6 +41,11 @@ module: native # with the latest block if it has fallen out of sync. resumable: true +# Indexer predicate configuration. predicates: + + # File paths to the predicate JSON ABI that is generated when you build your Sway predicates. abis: ~ + + # Template commitments (hashes) of the bytecode of predicates used by this indexer. templates: ~ diff --git a/examples/greetings/greetings-indexer/greetings_indexer.manifest.yaml b/examples/greetings/greetings-indexer/greetings_indexer.manifest.yaml index 2c49dbbc7..0f545df65 100644 --- a/examples/greetings/greetings-indexer/greetings_indexer.manifest.yaml +++ b/examples/greetings/greetings-indexer/greetings_indexer.manifest.yaml @@ -5,9 +5,16 @@ namespace: fuellabs # The identifier field is used to identify the given index. identifier: greetings -# The abi option is used to provide a link to the Sway JSON ABI that is generated when you -# build your project. -abi: examples/greetings/contracts/greeting/out/debug/greeting-abi.json +# Indexer contract configuration. +contracts: + + # File paths to the contract JSON ABIs that are generated when you build your Sway contracts. + abis: + - examples/greetings/contracts/greeting/out/debug/greeting-abi.json + + # Specifies which particular contracts you would like your indexer to subscribe to. + subscriptions: + - fuel1q6sj2srt0u40jdqg2lvvnspyuhse9rs2s2fv9nmv0hqjcrdc7sqsfpwv9x # The particular start block after which you'd like your indexer to start indexing events. start_block: ~ @@ -21,9 +28,6 @@ end_block: ~ # with the `--indexer_net_config` option. fuel_client: ~ -# The contract_id specifies which particular contract you would like your index to subscribe to. -contract_id: fuel1q6sj2srt0u40jdqg2lvvnspyuhse9rs2s2fv9nmv0hqjcrdc7sqsfpwv9x - # The graphql_schema field contains the file path that points to the GraphQL schema for the # given index. graphql_schema: examples/greetings/greetings-indexer/schema/greetings_indexer.schema.graphql @@ -36,4 +40,13 @@ module: # The resumable field contains a boolean that specifies whether or not the indexer should, synchronise # with the latest block if it has fallen out of sync. -resumable: true \ No newline at end of file +resumable: true + +# Indexer predicate configuration. +predicates: + + # File paths to the predicate JSON ABI that is generated when you build your Sway predicates. + abis: ~ + + # Template commitments (hashes) of the bytecode of predicates used by this indexer. + templates: ~ diff --git a/examples/hello-world/hello-world/hello_world.manifest.yaml b/examples/hello-world/hello-world/hello_world.manifest.yaml index 59c87237f..fb497c550 100644 --- a/examples/hello-world/hello-world/hello_world.manifest.yaml +++ b/examples/hello-world/hello-world/hello_world.manifest.yaml @@ -2,14 +2,17 @@ # as an organization identifier namespace: fuellabs -# Unique identifier for this indexer. -identifier: hello_indexer +# The identifier field is used to identify the given index. +identifier: hello_world +# Indexer contract configuration. contracts: - abis: - - examples/hello-world/contracts/greeting/out/debug/greeting-abi.json - subscriptions: - - fuel18hchrf7f4hnpkl84sqf8k0sk8gcauzeemzwgweea8dgr7eachv4s86r9t9 + + # File paths to the contract JSON ABIs that are generated when you build your Sway contracts. + abis: ~ + + # Specifies which particular contracts you would like your indexer to subscribe to. + subscriptions: ~ # The particular start block after which you'd like your indexer to start indexing events. start_block: ~ @@ -23,12 +26,9 @@ end_block: ~ # with the `--indexer_net_config` option. fuel_client: ~ -# Specifies which particular contract(s) you would like your indexer to subscribe to. -contract_subscriptions: - - fuel18hchrf7f4hnpkl84sqf8k0sk8gcauzeemzwgweea8dgr7eachv4s86r9t9 - -# A file path that points to the GraphQL schema for the given indexer. -graphql_schema: examples/hello-world/hello-indexer/schema/hello_indexer.schema.graphql +# The graphql_schema field contains the file path that points to the GraphQL schema for the +# given index. +graphql_schema: examples/hello-world/hello-world/schema/hello_world.schema.graphql # The module field contains a file path that points to code that will be run as an executor inside # of the indexer. @@ -40,8 +40,11 @@ module: # with the latest block if it has fallen out of sync. resumable: true +# Indexer predicate configuration. predicates: - abis: ~ - templates: ~ + # File paths to the predicate JSON ABI that is generated when you build your Sway predicates. + abis: ~ + # Template commitments (hashes) of the bytecode of predicates used by this indexer. + templates: ~ diff --git a/packages/fuel-indexer-lib/src/manifest.rs b/packages/fuel-indexer-lib/src/manifest.rs index 9d07711a4..94fc97921 100644 --- a/packages/fuel-indexer-lib/src/manifest.rs +++ b/packages/fuel-indexer-lib/src/manifest.rs @@ -366,4 +366,3 @@ impl TryFrom<&Vec> for Manifest { Ok(manifest) } } -