diff --git a/packages/common/src/allo/allo.ts b/packages/common/src/allo/allo.ts index 6f923664f..f38f63ac9 100644 --- a/packages/common/src/allo/allo.ts +++ b/packages/common/src/allo/allo.ts @@ -203,7 +203,7 @@ export interface Allo { >; batchDistributeFunds: (args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }) => AlloOperation< diff --git a/packages/common/src/allo/backends/allo-v1.ts b/packages/common/src/allo/backends/allo-v1.ts index 39a0b087f..085de427c 100644 --- a/packages/common/src/allo/backends/allo-v1.ts +++ b/packages/common/src/allo/backends/allo-v1.ts @@ -491,8 +491,8 @@ export class AlloV1 implements Allo { args.roundData.applicationsEndTime ? dateToEthereumTimestamp(args.roundData.applicationsEndTime) : args.roundData.roundEndTime - ? dateToEthereumTimestamp(args.roundData.roundEndTime) - : maxUint256, + ? dateToEthereumTimestamp(args.roundData.roundEndTime) + : maxUint256, dateToEthereumTimestamp(args.roundData.roundStartTime), args.roundData.roundEndTime ? dateToEthereumTimestamp(args.roundData.roundEndTime) @@ -984,7 +984,7 @@ export class AlloV1 implements Allo { } batchDistributeFunds(args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }): AlloOperation< @@ -1029,7 +1029,7 @@ export class AlloV1 implements Allo { }); const txResult = await sendTransaction(this.transactionSender, { - address: args.payoutStrategy, + address: getAddress(args.payoutStrategyOrPoolId), abi: MerklePayoutStrategyImplementationABI, functionName: "payout", args: [projectsWithMerkleProof], diff --git a/packages/common/src/allo/backends/allo-v2.ts b/packages/common/src/allo/backends/allo-v2.ts index 2743f992c..c27d874b8 100644 --- a/packages/common/src/allo/backends/allo-v2.ts +++ b/packages/common/src/allo/backends/allo-v2.ts @@ -1163,7 +1163,7 @@ export class AlloV2 implements Allo { } batchDistributeFunds(args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }): AlloOperation< @@ -1175,7 +1175,7 @@ export class AlloV2 implements Allo { } > { return new AlloOperation(async ({ emit }) => { - const poolId = BigInt(args.payoutStrategy); + const poolId = BigInt(args.payoutStrategyOrPoolId); const recipientIds: Address[] = args.projectIdsToBePaid.map((id) => getAddress(id) ); diff --git a/packages/round-manager/src/features/round/ViewFundGrantees.tsx b/packages/round-manager/src/features/round/ViewFundGrantees.tsx index 28315ede2..2eff36360 100644 --- a/packages/round-manager/src/features/round/ViewFundGrantees.tsx +++ b/packages/round-manager/src/features/round/ViewFundGrantees.tsx @@ -307,10 +307,10 @@ export function PayProjectsTable(props: { if (roundId) { const result = await allo .batchDistributeFunds({ - payoutStrategy: + payoutStrategyOrPoolId: alloVersion === "allo-v1" - ? getAddress(props.round.id) - : getAddress(props.round.payoutStrategy.id), + ? getAddress(props.round.payoutStrategy.id) + : props.round.id, allProjects: props.allProjects, projectIdsToBePaid: selectedProjects.map((p) => p.projectId), })