Skip to content

Commit

Permalink
Add default sql abi and meta stores (#146)
Browse files Browse the repository at this point in the history
* Add default sql abi and meta stores

* Replace prisma with effect sql and default sql loaders

* Changeset

* Fix monorepo loading of exports from package.json
  • Loading branch information
Ferossgp authored Nov 5, 2024
1 parent ab57e16 commit 657b68f
Show file tree
Hide file tree
Showing 15 changed files with 504 additions and 398 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-socks-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@3loop/transaction-decoder': minor
---

Add default sql stores based on @effect/sql for loading abi and contract meta
13 changes: 7 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "prisma generate"
"lint": "next lint"
},
"dependencies": {
"@3loop/transaction-decoder": "workspace:*",
"@3loop/transaction-interpreter": "workspace:*",
"@jitl/quickjs-singlefile-browser-release-sync": "^0.29.2",
"@monaco-editor/react": "^4.6.0",
"@prisma/client": "^5.19.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-icons": "^1.3.0",
Expand All @@ -30,7 +28,7 @@
"autoprefixer": "10.4.15",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"effect": "^3.7.0",
"effect": "^3.10.9",
"eslint": "^8.57.0",
"eslint-config-next": "13.4.19",
"jsonata": "^2.0.5",
Expand All @@ -45,11 +43,14 @@
"tailwindcss": "3.3.3",
"tailwindcss-animate": "^1.0.7",
"usehooks-ts": "^2.16.0",
"viem": "^2.21.1"
"viem": "^2.21.1",
"@effect/sql": "^0.18.16",
"@effect/sql-pg": "^0.19.5",
"@effect/experimental": "^0.30.16",
"@effect/platform": "^0.69.15"
},
"devDependencies": {
"bufferutil": "^4.0.8",
"prisma": "^5.19.1",
"typescript": "5.1.3",
"utf-8-validate": "^6.0.4"
}
Expand Down
28 changes: 0 additions & 28 deletions apps/web/schema.prisma

This file was deleted.

70 changes: 0 additions & 70 deletions apps/web/src/lib/abis.ts

This file was deleted.

181 changes: 0 additions & 181 deletions apps/web/src/lib/contract-loader.ts

This file was deleted.

7 changes: 7 additions & 0 deletions apps/web/src/lib/database.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { PgClient } from '@effect/sql-pg'
import { Redacted } from 'effect'

export const DatabaseLive = PgClient.layer({
url: Redacted.make(process.env.POSTGRES_URL!),
ssl: true,
})
Loading

0 comments on commit 657b68f

Please sign in to comment.