diff --git a/packages/processors/src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.ts b/packages/processors/src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.ts index 530a7ed..5334f3c 100644 --- a/packages/processors/src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.ts +++ b/packages/processors/src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.ts @@ -16,7 +16,7 @@ const STRATEGY_NAME = "allov2.DirectGrantsSimpleStrategy"; * - RegisteredWithSender * - DistributedWithRecipientAddress */ -export class DirectGrantsSimpleStrategyHandler extends BaseStrategyHandler { +export class DGSimpleStrategyHandler extends BaseStrategyHandler { constructor( private readonly chainId: ChainId, private readonly dependencies: ProcessorDependencies, diff --git a/packages/processors/src/processors/strategy/mapping.ts b/packages/processors/src/processors/strategy/mapping.ts index 9b9076a..0c0bad1 100644 --- a/packages/processors/src/processors/strategy/mapping.ts +++ b/packages/processors/src/processors/strategy/mapping.ts @@ -3,7 +3,7 @@ import { Hex } from "viem"; import type { StrategyHandlerConstructor } from "../../internal.js"; import { DirectAllocationStrategyHandler } from "./directAllocation/index.js"; import { DirectGrantsLiteStrategyHandler } from "./directGrantsLite/index.js"; -import { DirectGrantsSimpleStrategyHandler } from "./directGrantsSimple/index.js"; +import { DGSimpleStrategyHandler } from "./directGrantsSimple/index.js"; import { DVMDDirectTransferStrategyHandler } from "./donationVotingMerkleDistributionDirectTransfer/dvmdDirectTransfer.handler.js"; /** @@ -23,10 +23,8 @@ const strategyIdToHandler: Readonly> DVMDDirectTransferStrategyHandler, // DonationVotingMerkleDistributionDirectTransferStrategyv2.1 "0x4cd0051913234cdd7d165b208851240d334786d6e5afbb4d0eec203515a9c6f3": DirectAllocationStrategyHandler, - "0x263cb916541b6fc1fb5543a244829ccdba75264b097726e6ecc3c3cfce824bf5": - DirectGrantsSimpleStrategyHandler, - "0x53fb9d3bce0956ca2db5bb1441f5ca23050cb1973b33789e04a5978acfd9ca93": - DirectGrantsSimpleStrategyHandler, + "0x263cb916541b6fc1fb5543a244829ccdba75264b097726e6ecc3c3cfce824bf5": DGSimpleStrategyHandler, + "0x53fb9d3bce0956ca2db5bb1441f5ca23050cb1973b33789e04a5978acfd9ca93": DGSimpleStrategyHandler, "0x103732a8e473467a510d4128ee11065262bdd978f0d9dad89ba68f2c56127e27": DirectGrantsLiteStrategyHandler, } as const; diff --git a/packages/processors/test/strategy/directGrantsSimple/directGrantsSimple.handler.spec.ts b/packages/processors/test/strategy/directGrantsSimple/directGrantsSimple.handler.spec.ts index 0a63a19..a48eb61 100644 --- a/packages/processors/test/strategy/directGrantsSimple/directGrantsSimple.handler.spec.ts +++ b/packages/processors/test/strategy/directGrantsSimple/directGrantsSimple.handler.spec.ts @@ -12,7 +12,7 @@ import { ChainId, ILogger, ProcessorEvent, StrategyEvent } from "@grants-stack-i import { UnsupportedEventException } from "../../../src/exceptions/index.js"; import { BaseDistributedHandler } from "../../../src/processors/strategy/common/index.js"; -import { DirectGrantsSimpleStrategyHandler } from "../../../src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.js"; +import { DGSimpleStrategyHandler } from "../../../src/processors/strategy/directGrantsSimple/directGrantsSimple.handler.js"; import { DGSimpleRegisteredHandler, DGSimpleTimestampsUpdatedHandler, @@ -45,7 +45,7 @@ vi.mock("../../../src/processors/strategy/common/baseDistributed.handler.js", () }); describe("DirectGrantsSimpleStrategyHandler", () => { - let handler: DirectGrantsSimpleStrategyHandler; + let handler: DGSimpleStrategyHandler; let mockMetadataProvider: IMetadataProvider; let mockRoundRepository: IRoundReadRepository; let mockProjectRepository: IProjectReadRepository; @@ -69,7 +69,7 @@ describe("DirectGrantsSimpleStrategyHandler", () => { mockPricingProvider = {} as IPricingProvider; mockApplicationRepository = {} as IApplicationReadRepository; - handler = new DirectGrantsSimpleStrategyHandler(chainId, { + handler = new DGSimpleStrategyHandler(chainId, { metadataProvider: mockMetadataProvider, roundRepository: mockRoundRepository, projectRepository: mockProjectRepository, diff --git a/packages/processors/test/strategy/directGrantsSimple/handlers/registered.handler.spec.ts b/packages/processors/test/strategy/directGrantsSimple/handlers/registered.handler.spec.ts index 6d74acc..0a944c8 100644 --- a/packages/processors/test/strategy/directGrantsSimple/handlers/registered.handler.spec.ts +++ b/packages/processors/test/strategy/directGrantsSimple/handlers/registered.handler.spec.ts @@ -15,33 +15,6 @@ import { ChainId, ProcessorEvent } from "@grants-stack-indexer/shared"; import { DGSimpleRegisteredHandler } from "../../../../src/processors/strategy/directGrantsSimple/handlers/registered.handler.js"; import { createMockEvent } from "../../../mocks/index.js"; -// function createMockEvent( -// overrides: DeepPartial> = {}, -// ): ProcessorEvent<"Strategy", "RegisteredWithSender"> { -// const defaultEvent: ProcessorEvent<"Strategy", "RegisteredWithSender"> = { -// params: { -// recipientId: "0x1234567890123456789012345678901234567890", -// data: "0x0000000000000000000000001234567890123456789012345678901234567890000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003b6261666b72656967796334336366696e786c6e6168713561617773676869626574763675737273376b6b78663776786d7a626a79726f37366977790000000000", -// sender: "0xcBf407C33d68a55CB594Ffc8f4fD1416Bba39DA5", -// }, -// eventName: "RegisteredWithSender", -// srcAddress: "0x1234567890123456789012345678901234567890", -// blockNumber: 12345, -// blockTimestamp: 1000000000, -// chainId: 10 as ChainId, -// contractName: "Strategy", -// logIndex: 1, -// transactionFields: { -// hash: "0xd2352acdcd59e312370831ea927d51a1917654697a72434cd905a60897a5bb8b", -// transactionIndex: 6, -// from: "0xcBf407C33d68a55CB594Ffc8f4fD1416Bba39DA5", -// }, -// strategyId: "0x9fa6890423649187b1f0e8bf4265f0305ce99523c3d11aa36b35a54617bb0ec0", -// }; - -// return mergeDeep(defaultEvent, overrides); -// } - describe("DGSimpleRegisteredHandler", () => { let handler: DGSimpleRegisteredHandler; let mockRoundRepository: IRoundRepository;