diff --git a/packages/repository/src/interfaces/roundRepository.interface.ts b/packages/repository/src/interfaces/roundRepository.interface.ts index cff5a9b..5e7b1b3 100644 --- a/packages/repository/src/interfaces/roundRepository.interface.ts +++ b/packages/repository/src/interfaces/roundRepository.interface.ts @@ -38,6 +38,19 @@ export interface IRoundReadRepository { strategyAddress: Address, ): Promise; + /** + * Retrieves a round by a specific role and role value. + * @param chainId The chain ID of the round. + * @param roleName The name of the role to filter by. + * @param roleValue The value of the role to filter by. + * @returns A promise that resolves to a Round object if found, or undefined if not found. + */ + getRoundByRole( + chainId: ChainId, + roleName: RoundRoleNames, + roleValue: string, + ): Promise; + /** * Retrieves the match token address for a specific round. * @param chainId The chain ID of the round. diff --git a/packages/repository/src/repositories/kysely/round.repository.ts b/packages/repository/src/repositories/kysely/round.repository.ts index 89daa11..decc0b0 100644 --- a/packages/repository/src/repositories/kysely/round.repository.ts +++ b/packages/repository/src/repositories/kysely/round.repository.ts @@ -61,7 +61,7 @@ export class KyselyRoundRepository implements IRoundRepository { /* @inheritdoc */ async getRoundByRole( chainId: ChainId, - roleName: "admin" | "manager", + roleName: RoundRoleNames, roleValue: string, ): Promise { return this.db @@ -160,6 +160,7 @@ export class KyselyRoundRepository implements IRoundRepository { .execute(); } + /* @inheritdoc */ async deleteManyRoundRolesByRoleAndAddress( chainId: ChainId, roundId: string,