Skip to content

Commit bc8abb2

Browse files
committed
feat(ccip): add token directory API with lane verifiers and v2 feature detection
1 parent 1306d03 commit bc8abb2

File tree

73 files changed

+37340
-42213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+37340
-42213
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ ALGOLIA_WRITE_API_KEY=
33
ALGOLIA_INDEX_NAME=docs-test
44
PUBLIC_ALGOLIA_SEARCH_APP_ID=
55
PUBLIC_ALGOLIA_SEARCH_PUBLIC_API_KEY=
6+
CCIP_GRAPHQL_ENDPOINT=
7+
CCIP_GRAPHQL_API_KEY=

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ updates:
103103
- "@types/*"
104104
- "@rollup/plugin-yaml"
105105

106+
# GraphQL
107+
graphql:
108+
patterns:
109+
- "graphql"
110+
- "graphql-request"
111+
- "@graphql-codegen*"
112+
- "@graphql-typed-document-node*"
113+
- "lru-cache"
114+
- "p-limit"
115+
106116
# Documentation & API
107117
documentation:
108118
patterns:

codegen.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import type { CodegenConfig } from "@graphql-codegen/cli"
2+
import dotenv from "dotenv"
3+
4+
dotenv.config()
5+
6+
const GRAPHQL_API_URL = process.env.CCIP_GRAPHQL_ENDPOINT
7+
const GRAPHQL_AUTH_TOKEN = process.env.CCIP_GRAPHQL_API_KEY
8+
9+
if (!GRAPHQL_API_URL) {
10+
throw new Error("CCIP_GRAPHQL_ENDPOINT is not defined in .env")
11+
}
12+
13+
if (!GRAPHQL_AUTH_TOKEN) {
14+
throw new Error("CCIP_GRAPHQL_API_KEY is not defined in .env")
15+
}
16+
17+
const config: CodegenConfig = {
18+
schema: {
19+
[GRAPHQL_API_URL]: {
20+
headers: {
21+
Authorization: `${GRAPHQL_AUTH_TOKEN}`,
22+
},
23+
},
24+
},
25+
documents: ["./src/lib/ccip/graphql/queries/**/*.ts"],
26+
emitLegacyCommonJSImports: false,
27+
generates: {
28+
"./src/lib/ccip/graphql/__generated__/": {
29+
preset: "client",
30+
presetConfig: {
31+
gqlTagName: "gql",
32+
},
33+
},
34+
"./src/lib/ccip/graphql/schema.graphql.json": {
35+
plugins: ["introspection"],
36+
},
37+
},
38+
ignoreNoDocuments: true,
39+
}
40+
41+
export default config

jest.config.cjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,10 @@ module.exports = {
3535
"\\.ya?ml$": "<rootDir>/src/__mocks__/yamlMock.ts",
3636
},
3737
transformIgnorePatterns: ["/node_modules/(?!.*\\.mjs$)"],
38-
testPathIgnorePatterns: ["/node_modules/", "src/tests/chain-api.test.ts"],
38+
testPathIgnorePatterns: [
39+
"/node_modules/",
40+
"\\.vercel/",
41+
"src/tests/chain-api.test.ts",
42+
"src/tests/chain-identifier-service.test.ts",
43+
],
3944
}

0 commit comments

Comments
 (0)