-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cf4610
commit d0acde4
Showing
11 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { ApolloClient, InMemoryCache } from '@apollo/client' | ||
|
||
import { sepolia } from 'viem/chains' | ||
import { subgraphUri, v4SubgraphUri } from './subgraphUri' | ||
|
||
/** | ||
* Unlike `client`, `serverClient` is safe to use in the edge runtime. | ||
* However, this client does not perform parsing on the response, | ||
* However, this client does not perform parsing on the response, | ||
* meaning returned objects may not match the auto-generated types. | ||
*/ | ||
const serverClient = new ApolloClient({ | ||
uri: subgraphUri(), | ||
cache: new InMemoryCache(), | ||
}) | ||
|
||
const v4ServerClient = new ApolloClient({ | ||
uri: v4SubgraphUri(), | ||
const v4SepoliaServerClient = new ApolloClient({ | ||
uri: v4SubgraphUri(sepolia.id), | ||
cache: new InMemoryCache(), | ||
}) | ||
|
||
export { serverClient, v4ServerClient } | ||
export { serverClient, v4SepoliaServerClient } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { useChainId } from 'wagmi' | ||
import { v4ProjectRoute } from '../utils/routes' | ||
|
||
export function useV4ProjectRoute(projectId: number) { | ||
const chainId = useChainId() | ||
|
||
return v4ProjectRoute({ | ||
chainId, | ||
projectId, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE public.projects | ||
add COLUMN "chain_id" int |