Skip to content

Commit

Permalink
add launch query by address hook to sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfix committed Feb 5, 2025
1 parent eef3b13 commit 7f0662f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/sdk/src/react/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./use-launch-by-address-query";
export * from "./use-launch-query";
export * from "./use-launches-query";
export * from "./use-bid";
Expand Down
14 changes: 14 additions & 0 deletions packages/sdk/src/react/hooks/use-launch-by-address-query.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { deployments } from "@axis-finance/deployments";
import { useGetBatchAuctionLotsByBaseTokenAddressQuery } from "@axis-finance/subgraph-client";

export function useLaunchByAddressQuery(
chainId: number,
baseTokenAddress: string,
) {
const endpoint = deployments[chainId].subgraphURL;

return useGetBatchAuctionLotsByBaseTokenAddressQuery(
{ endpoint },
{ baseTokenAddress },
);
}

0 comments on commit 7f0662f

Please sign in to comment.