Skip to content

Commit

Permalink
data type on service instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevtechi committed Jan 20, 2025
1 parent cabe180 commit 90590c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/logs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function logDataToQueryString(
.join("");
}

export class LogsService {
export class LogsService<D = LogData, E = unknown> {
private url: string;

constructor(config: CommunityConfig) {
Expand All @@ -86,7 +86,7 @@ export class LogsService {
this.url = `${network.node.url}/v1/logs`;
}

async getLog<D = LogData, E = unknown>(
async getLog(
tokenAddress: string,
hash: string
): Promise<ObjectResponse<Log<D, E>, undefined>> {
Expand All @@ -96,7 +96,7 @@ export class LogsService {
return resp.json();
}

async getLogs<D = LogData, E = unknown>(
async getLogs(
tokenAddress: string,
signature: string,
params?: PaginationParams & LogQueryParams
Expand Down Expand Up @@ -125,7 +125,7 @@ export class LogsService {
return resp.json();
}

async getAllLogs<D = LogData, E = unknown>(
async getAllLogs(
tokenAddress: string,
signature: string,
params?: PaginationParams & LogQueryParams
Expand All @@ -145,7 +145,7 @@ export class LogsService {
return resp.json();
}

async getNewLogs<D = LogData, E = unknown>(
async getNewLogs(
tokenAddress: string,
signature: string,
params?: PaginationParams & NewLogQueryParams
Expand All @@ -165,7 +165,7 @@ export class LogsService {
return resp.json();
}

async getAllNewLogs<D = LogData, E = unknown>(
async getAllNewLogs(
tokenAddress: string,
signature: string,
params?: PaginationParams & NewLogQueryParams
Expand Down

0 comments on commit 90590c7

Please sign in to comment.