From 800e3f3817c2f818ef3ba6e84d11837af1e67cb4 Mon Sep 17 00:00:00 2001 From: Francesco Ceccon Date: Wed, 17 Jan 2024 15:55:00 +0100 Subject: [PATCH] indexer: fix bug in lookupEventFromSelector --- .changeset/dull-teachers-explode.md | 5 +++++ packages/indexer/src/starknet/parser.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/dull-teachers-explode.md diff --git a/.changeset/dull-teachers-explode.md b/.changeset/dull-teachers-explode.md new file mode 100644 index 0000000..39f5d3f --- /dev/null +++ b/.changeset/dull-teachers-explode.md @@ -0,0 +1,5 @@ +--- +"@apibara/indexer": patch +--- + +Fix bug in lookupEventFromSelector diff --git a/packages/indexer/src/starknet/parser.ts b/packages/indexer/src/starknet/parser.ts index e869f97..d8970bb 100644 --- a/packages/indexer/src/starknet/parser.ts +++ b/packages/indexer/src/starknet/parser.ts @@ -31,7 +31,7 @@ export class Contract { this.selectorToEvent = {}; for (const event of this.abi) { if (event.type !== "event") { - return; + continue; } this.selectorToEvent[getSelector(event.name)] = event.name; }