You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/contract-verification/README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,3 +52,30 @@ and [/apps/contract-verification/scripts/medium-verify.sh](./scripts/medium-veri
52
52
#### Direct API Usage
53
53
54
54
- Standard JSON: see [/apps/contract-verification/scripts/verify-with-curl.sh](./scripts/verify-with-curl.sh) for a full example.
55
+
56
+
### Development
57
+
58
+
#### Prerequisites
59
+
60
+
- A container runtime (e.g., [OrbStack](https://docs.orbstack.dev), [Colima](https://github.com/abiosoft/colima), Docker Desktop)
61
+
62
+
```sh
63
+
cp .env.example .env # Copy example environment variables
64
+
pnpm install # Install dependencies
65
+
pnpm dev # Start development server
66
+
```
67
+
68
+
Once dev server is running, you can run scripts in the [/apps/contract-verification/scripts](./scripts) directory to populate your local database with verified contracts.
69
+
70
+
#### Database
71
+
72
+
We use [D1](https://developers.cloudflare.com/d1), a serverless SQLite-compatible database by Cloudflare.
73
+
Sometimes you need to debug the local database in development,
74
+
especially when it's SQLite. Sadly, wrangler doesn't have a nice way to do this.
75
+
76
+
Improvised solution: we [locate the local SQLite file wrangler uses](/apps/contract-verification/scripts/local-d1.sh) and run drizzle-kit studio to view it.
77
+
78
+
| environment | database | dialect | GUI |
79
+
|-------------|----------|----------|-----|
80
+
| production | Cloudflare D1 | SQLite |[DrizzleKit Studio](https://github.com/drizzle-team/drizzle-studio)|
81
+
| development | Local SQLite | SQLite |[Cloudflare Dashboard](https://dash.cloudflare.com/)|
0 commit comments