Skip to content

Commit 2253ce5

Browse files
committed
Merge branch 'main' into yash/ocr-contracts-integration
2 parents 376d184 + 11b4d9e commit 2253ce5

File tree

4,591 files changed

+81928
-74225
lines changed

Some content is hidden

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

4,591 files changed

+81928
-74225
lines changed

.changeset/config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
2+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
3+
"onlyUpdatePeerDependentsWhenOutOfRange": true,
4+
"updateInternalDependents": "always"
5+
},
26
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
7+
"access": "public",
8+
"baseBranch": "main",
39
"changelog": [
410
"@changesets/changelog-github",
511
{
612
"repo": "thirdweb-dev/js"
713
}
814
],
915
"commit": false,
10-
"access": "public",
11-
"baseBranch": "main",
12-
"updateInternalDependencies": "patch",
1316
"ignore": [
1417
"playground-web",
1518
"thirdweb-dashboard",
1619
"wallet-ui",
1720
"portal",
18-
"thirdweb-login"
21+
"nebula-app"
1922
],
20-
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
21-
"updateInternalDependents": "always",
22-
"onlyUpdatePeerDependentsWhenOutOfRange": true
23-
},
2423
"snapshot": {
2524
"prereleaseTemplate": "{tag}-{commit}-{datetime}"
26-
}
25+
},
26+
"updateInternalDependencies": "patch"
2727
}

.changeset/fluffy-cows-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Handle non urls for metadata images in payment widgets

.cursor/rules/dashboard.mdc

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ description: Rules for writing features in apps/dashboard
33
globs: dashboard
44
alwaysApply: false
55
---
6-
76
# Reusable Core UI Components
87

98
- Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
@@ -101,3 +100,29 @@ Guidelines:
101100
- Keep `queryKey` stable and descriptive for cache hits.
102101
- Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
103102
- Configure `staleTime` / `cacheTime` according to freshness requirements.
103+
104+
# Analytics Event Reporting
105+
106+
- **Add events intentionally** – only when they answer a concrete product/business question.
107+
- **Event name**: human-readable `<subject> <verb>` phrase (e.g. `"contract deployed"`).
108+
- **Reporting helper**: `report<Subject><Verb>` (PascalCase); all live in `src/@/analytics/report.ts`.
109+
- **Mandatory JSDoc**: explain *Why* the event exists and *Who* owns it (`@username`).
110+
- **Typed properties**: accept a single `properties` object and pass it unchanged to `posthog.capture`.
111+
- **Client-side only**: never import `posthog-js` in server components.
112+
- **Housekeeping**: ping **#core-services** before renaming or removing an event.
113+
114+
```ts
115+
/**
116+
* ### Why do we need to report this event?
117+
* - Tracks number of contracts deployed
118+
*
119+
* ### Who is responsible for this event?
120+
* @jnsdls
121+
*/
122+
export function reportContractDeployed(properties: {
123+
address: string;
124+
chainId: number;
125+
}) {
126+
posthog.capture("contract deployed", properties);
127+
}
128+
```

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Setup Biome
6464
uses: biomejs/setup-biome@a9763ed3d2388f5746f9dc3e1a55df7f4609bc89 # v2.5.1
6565
with:
66-
version: latest
66+
version: 2.0.4
6767

6868
- run: pnpm lint
6969

.vscode/settings.json

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
{
2-
"editor.formatOnSave": true,
3-
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": "explicit",
5-
"source.organizeImports.biome": "explicit",
6-
"quickfix.biome": "explicit"
7-
},
8-
"editor.defaultFormatter": "biomejs.biome",
9-
"typescript.preferences.autoImportFileExcludePatterns": [
10-
"./packages/thirdweb/src/exports"
11-
],
12-
"typescript.preferences.autoImportSpecifierExcludeRegexes": [
13-
"@radix-ui",
14-
"next/router",
15-
"next/dist",
16-
"^lucide-react/dist/lucide-react.suffixed$"
17-
],
18-
"typescript.tsdk": "node_modules/typescript/lib",
19-
"[typescriptreact]": {
2+
"[css]": {
203
"editor.defaultFormatter": "biomejs.biome"
214
},
22-
"[typescript]": {
5+
"[javascript]": {
236
"editor.defaultFormatter": "biomejs.biome"
247
},
258
"[json]": {
@@ -28,14 +11,30 @@
2811
"[markdown]": {
2912
"editor.defaultFormatter": "esbenp.prettier-vscode"
3013
},
31-
"[javascript]": {
14+
"[typescript]": {
3215
"editor.defaultFormatter": "biomejs.biome"
3316
},
34-
"[css]": {
17+
"[typescriptreact]": {
3518
"editor.defaultFormatter": "biomejs.biome"
3619
},
20+
"editor.codeActionsOnSave": {
21+
"quickfix.biome": "explicit",
22+
"source.fixAll.biome": "explicit"
23+
},
24+
"editor.defaultFormatter": "biomejs.biome",
25+
"editor.formatOnSave": true,
3726
"eslint.workingDirectories": [
3827
{ "pattern": "./packages/*/" },
3928
{ "pattern": "./apps/*/" }
40-
]
29+
],
30+
"typescript.preferences.autoImportFileExcludePatterns": [
31+
"./packages/thirdweb/src/exports"
32+
],
33+
"typescript.preferences.autoImportSpecifierExcludeRegexes": [
34+
"@radix-ui",
35+
"next/router",
36+
"next/dist",
37+
"^lucide-react/dist/lucide-react.suffixed$"
38+
],
39+
"typescript.tsdk": "node_modules/typescript/lib"
4140
}

AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,41 @@ Welcome, AI copilots! This guide captures the coding standards, architectural de
104104
-- Configure staleTime / cacheTime based on freshness requirements (default ≥ 60 s).
105105
-- Keep tokens secret by calling internal API routes or server actions.
106106

107+
6.5 Analytics Event Reporting
108+
109+
- **When to create a new event**
110+
-- Only add events that answer a clear product or business question.
111+
-- Check `src/@/analytics/report.ts` first; avoid duplicates.
112+
113+
- **Naming conventions**
114+
-- **Event name**: human-readable phrase in the form `<subject> <verb>` (e.g. "contract deployed").
115+
-- **Reporting function**: `report<Subject><Verb>` (PascalCase).
116+
-- All reporting helpers currently live in the shared `report.ts` file.
117+
118+
- **Boilerplate template**
119+
-- Add a JSDoc header explaining **Why** the event exists and **Who** owns it (`@username`).
120+
-- Accept a single typed `properties` object and forward it unchanged to `posthog.capture`.
121+
-- Example:
122+
123+
```ts
124+
/**
125+
* ### Why do we need to report this event?
126+
* - Tracks number of contracts deployed
127+
*
128+
* ### Who is responsible for this event?
129+
* @jnsdls
130+
*/
131+
export function reportContractDeployed(properties: {
132+
address: string;
133+
chainId: number;
134+
}) {
135+
posthog.capture("contract deployed", properties);
136+
}
137+
```
138+
139+
- **Client-side only**: never import `posthog-js` in server components.
140+
- **Housekeeping**: Inform **#eng-core-services** before renaming or removing an existing event.
141+
107142
108143

109144
7. Performance & Bundle Size

apps/dashboard/.env.example

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ NEXT_PUBLIC_STRIPE_KEY=
4444

4545
NEXT_PUBLIC_STRIPE_PAYMENT_METHOD_CFG_ID=
4646

47-
# Needed for contract analytics / blockchain data information
48-
CHAINSAW_API_KEY=
49-
5047
#
5148
# Private (server)
5249
#
@@ -65,17 +62,11 @@ MORALIS_API_KEY=
6562
# - not required to build (unless testing wallet NFTs)>
6663
SSR_ALCHEMY_KEY=
6764

68-
# beehiiv.com API key (used for newsletter signups)
69-
# - not required to build (unless testing newsletter signups)>
70-
BEEHIIV_API_KEY=
7165

7266
# Hubspot Access Token (used for contact us form)
7367
# - not required to build (unless testing contact us form)>
7468
HUBSPOT_ACCESS_TOKEN=
7569

76-
# Github API Token (used for /open-source)
77-
GITHUB_API_TOKEN="ghp_..."
78-
7970
# Upload server url
8071
NEXT_PUBLIC_DASHBOARD_UPLOAD_SERVER="https://storage.thirdweb-preview.com"
8172

@@ -100,8 +91,6 @@ REDIS_URL=""
10091

10192
ANALYTICS_SERVICE_URL=""
10293

103-
# Required for Nebula Chat
104-
NEXT_PUBLIC_NEBULA_URL=""
10594

10695
# required for billing parts of the dashboard (team -> settings -> billing / invoices)
10796
STRIPE_SECRET_KEY=""

0 commit comments

Comments
 (0)