Skip to content

Commit f9de584

Browse files
committed
fix: Set indexer starting block to a fixed value instead of a dynamic calculation.
1 parent fa74516 commit f9de584

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

the_last_indexer/indexers/paymesh-starknet.indexer.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ export default function (runtimeConfig: ApibaraRuntimeConfig) {
3737

3838
console.log("Crowd Funding Cache: ", crowd_funding_cache);
3939
console.log("Group Cache: ", group_cache);
40-
console.log("starting block ", startingBlock-20000)
41-
40+
console.log("starting block ", 4434432);
4241
return defineIndexer(StarknetStream)({
4342
streamUrl: crowdfundingConfig.streamUrl || groupConfig.streamUrl,
4443
finality: "accepted",
45-
startingBlock: BigInt(startingBlock-20000),
44+
startingBlock: BigInt(4434432),
4645
filter: {
4746
events: [
4847
{
@@ -209,13 +208,13 @@ export default function (runtimeConfig: ApibaraRuntimeConfig) {
209208
// Check if transfer is to crowdfunding pool
210209
if (crowd_funding_cache.includes(args.to)) {
211210
const { from, to, value } = JSON.parse(safeArgs);
212-
donate_to_crowd_funding(
213-
to,
214-
value,
215-
from,
216-
event.address,
217-
event.transactionHash
218-
);
211+
donate_to_crowd_funding(
212+
to,
213+
value,
214+
from,
215+
event.address,
216+
event.transactionHash
217+
);
219218
logger.info(`\n💡 Transfer event to crowdfunding ${to}`);
220219
}
221220
// Check if transfer is to group
@@ -429,4 +428,4 @@ const subsciption_topped = (group_address: string, usage_count: number) => {
429428
}).catch((err) => {
430429
console.error(`Subscription top up error for ${group_address}:`, err);
431430
});
432-
};
431+
};

0 commit comments

Comments
 (0)