Skip to content

Commit 1497d25

Browse files
committed
fix debug
1 parent b5c3232 commit 1497d25

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "substreams",
33
"description": "Substreams Javascript consumer",
4-
"version": "0.7.0",
4+
"version": "0.7.1",
55
"homepage": "https://github.com/pinax-network/substreams-js",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,6 @@ import { IEnumTypeRegistry, IMessageTypeRegistry, IServiceTypeRegistry } from "@
4444
import { parseAuthorization } from './authorization';
4545
export type Registry = IMessageTypeRegistry & IEnumTypeRegistry & IServiceTypeRegistry;
4646

47-
// export interface MapOutput extends MapModuleOutput {
48-
// data: {
49-
// case: "output"
50-
// value: Any;
51-
// }
52-
// }
53-
54-
// export interface StoreDelta extends StoreModuleOutput {
55-
// data: {
56-
// case: "debug_store_outputs"
57-
// value: StoreModuleOutput;
58-
// }
59-
// }
60-
61-
// { no: 1, name: "output", kind: "message", T: MapModuleOutput },
62-
// { no: 2, name: "clock", kind: "message", T: Clock },
63-
// { no: 3, name: "cursor", kind: "scalar", T: 9 /* ScalarType.STRING */ },
64-
// { no: 4, name: "final_block_height", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
65-
// { no: 10, name: "debug_map_outputs", kind: "message", T: MapModuleOutput, repeated: true },
66-
// { no: 11, name: "debug_store_outputs", kind: "message", T: StoreModuleOutput, repeated: true },
67-
6847
export const DEFAULT_HOST = "https://mainnet.eth.streamingfast.io:443";
6948
export const DEFAULT_AUTH = "https://auth.streamingfast.io/v1/auth/issue";
7049
export const DEFAULT_IPFS = "https://ipfs.pinax.network/ipfs/";
@@ -81,8 +60,8 @@ type MessageEvents = {
8160
// V2 updates
8261
// new
8362
output: (output: MapModuleOutput, clock: Clock) => void;
84-
debugStoreOutputs: (output: StoreModuleOutput, clock: Clock) => void;
85-
debugMapOutputs: (output: MapModuleOutput, clock: Clock) => void;
63+
debugStoreOutputs: (output: StoreModuleOutput[], clock: Clock) => void;
64+
debugMapOutputs: (output: MapModuleOutput[], clock: Clock) => void;
8665
finalBlockHeight: (block_height: bigint, clock: Clock) => void;
8766
// deprecated
8867
// mapOutput: (output: MapModuleOutput, clock: Clock) => void;
@@ -235,6 +214,11 @@ export class Substreams extends (EventEmitter as new () => TypedEmitter<MessageE
235214
if (!decoded) continue;
236215
this.emit("anyMessage", decoded, clock, typeName);
237216
}
217+
// Debug
218+
this.emit("debugStoreOutputs", block.debugStoreOutputs, clock);
219+
this.emit("debugMapOutputs", block.debugMapOutputs, clock);
220+
221+
// Final
238222
this.emit("cursor", block.cursor, clock);
239223
this.emit("finalBlockHeight", finalBlockHeight, clock);
240224
last_cursor = block.cursor;

0 commit comments

Comments
 (0)