Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Oct 10, 2023
1 parent 12621c8 commit e515cd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const stopBlockNum = "+3";

// Read Substream
const substreamPackage = await readPackage(manifest);
if (!substreamPackage.modules) {
throw new Error("No modules found in substream package");
}
const moduleHash = await createModuleHashHex(substreamPackage.modules, outputModule);
console.log({ moduleHash });

Expand Down
4 changes: 3 additions & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const stopBlockNum = "+3";

// Read Substream
const substreamPackage = await readPackage(manifest);
if (!substreamPackage.modules) {
throw new Error("No modules found in substream package");
}
const moduleHash = await createModuleHashHex(substreamPackage.modules, outputModule);
console.log({ moduleHash });

Expand All @@ -32,7 +35,6 @@ const request = createRequest({
outputModule,
startBlockNum,
stopBlockNum,
productionMode: true,
});

// NodeJS Events
Expand Down

0 comments on commit e515cd6

Please sign in to comment.