create-ponder 0.16.3 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +28 -32
  2. package/dist/index.js +6 -3
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Create Ponder
1
+ # create-ponder
2
2
 
3
3
  [![CI status][ci-badge]][ci-url]
4
4
  [![Version][version-badge]][version-url]
5
5
  [![Telegram chat][tg-badge]][tg-url]
6
6
  [![License][license-badge]][license-url]
7
7
 
8
- Ponder is an open-source framework for blockchain application backends.
8
+ Ponder is an open-source TypeScript framework for EVM data indexing.
9
9
 
10
10
  ## Documentation
11
11
 
@@ -17,47 +17,45 @@ Join [Ponder's telegram chat](https://t.me/pondersh) for support, feedback, and
17
17
 
18
18
  ## Features
19
19
 
20
- &nbsp;Local development server with hot reloading<br/>
21
- &nbsp;`create-ponder` CLI tool to get started from an Etherscan link or Graph Protocol subgraph<br/>
22
- &nbsp;End-to-end type safety using [viem](https://viem.sh) and [ABIType](https://github.com/wagmi-dev/abitype)<br/>
23
- &nbsp;Autogenerated GraphQL API<br/>
24
- &nbsp;Easy to deploy anywhere using Node.js/Docker<br/>
25
- ✅ &nbsp;Supports all Ethereum-based blockchains, including test nodes like [Anvil](https://book.getfoundry.sh/anvil)<br/>
26
- ✅ &nbsp;Index events from multiple chains in the same app<br/>
27
- ✅ &nbsp;Reconciles chain reorganization<br/>
28
- ✅ &nbsp;Factory contracts<br/>
29
- ✅ &nbsp;Process transactions calls (in addition to logs)<br/>
30
- 🏗️ &nbsp;Run effects (e.g. send an API request) in indexing code<br/>
20
+ * Index any contract or account on any EVM-compatible chain
21
+ * Write indexed data to Postgres
22
+ * Query indexed data over HTTP using GraphQL or SQL
23
+ * Build rapidly with a powerful local development server
24
+ * Deploy anywhere that runs Node.js or Bun
31
25
 
32
26
  ## Quickstart
33
27
 
34
28
  ### 1. Run `create-ponder`
35
29
 
36
- You will be asked for a project name, and if you are using a [template](https://ponder.sh/docs/api-reference/create-ponder#templates) (recommended). Then, the CLI will create a project directory, install dependencies, and initialize a git repository.
30
+ You will be asked for a project name, and if you are using a [template](https://ponder.sh/docs/api-reference/create-ponder#templates) (recommended).
31
+
32
+ After the prompts, the CLI will create a project directory, install dependencies, and initialize a git repository.
37
33
 
38
34
  ```bash
39
- npm init ponder@latest
35
+ bun create ponder
40
36
  # or
41
37
  pnpm create ponder
42
38
  # or
43
- yarn create ponder
39
+ npm init ponder@latest
44
40
  ```
45
41
 
46
42
  ### 2. Start the development server
47
43
 
48
- Just like Next.js and Vite, Ponder has a development server that automatically reloads when you save changes in any project file. It also prints `console.log` statements and errors encountered while running your code. First, `cd` into your project directory, then start the server.
44
+ Ponder has a development server that automatically reloads when you save changes in any project file. It also prints `console.log` statements and errors encountered while running your code.
45
+
46
+ First, `cd` into your project directory, then start the server.
49
47
 
50
48
  ```bash
51
- npm run dev
49
+ bun dev
52
50
  # or
53
51
  pnpm dev
54
52
  # or
55
- yarn dev
53
+ npm run dev
56
54
  ```
57
55
 
58
- ### 3. Add contracts & chains
56
+ ### 3. Specify contracts & chains
59
57
 
60
- Ponder fetches event logs for the contracts added to `ponder.config.ts`, and passes those events to the indexing functions you write.
58
+ Ponder fetches event logs for the contracts in `ponder.config.ts`, and passes those events to the indexing functions you write.
61
59
 
62
60
  ```ts
63
61
  // ponder.config.ts
@@ -85,7 +83,7 @@ export default createConfig({
85
83
 
86
84
  ### 4. Define your schema
87
85
 
88
- The `ponder.schema.ts` file contains the database schema, and defines the shape data that the GraphQL API serves.
86
+ The `ponder.schema.ts` file specifies the database schema, which should match the shape of your application's data model.
89
87
 
90
88
  ```ts
91
89
  // ponder.schema.ts
@@ -101,7 +99,7 @@ export const ensName = onchainTable("ens_name", (t) => ({
101
99
 
102
100
  ### 5. Write indexing functions
103
101
 
104
- Files in the `src/` directory contain **indexing functions**, which are TypeScript functions that process a contract event. The purpose of these functions is to insert data into the entity store.
102
+ Files in the `src/` directory contain **indexing functions**, which are TypeScript functions that process a contract event. The purpose of these functions is to write indexed data to the database.
105
103
 
106
104
  ```ts
107
105
  // src/BaseRegistrar.ts
@@ -120,11 +118,9 @@ ponder.on("BaseRegistrar:NameRegistered", async ({ event, context }) => {
120
118
  });
121
119
  ```
122
120
 
123
- See the [create & update records](https://ponder.sh/docs/indexing/write) docs for a detailed guide on writing indexing functions.
124
-
125
121
  ### 6. Query the GraphQL API
126
122
 
127
- Ponder automatically generates a frontend-ready GraphQL API based on your `ponder.schema.ts` file. The API serves data that you inserted in your indexing functions.
123
+ Ponder automatically generates a GraphQL API based on your `ponder.schema.ts` file. The API serves data that you inserted in your indexing functions.
128
124
 
129
125
  ```ts
130
126
  {
@@ -165,12 +161,12 @@ If you're interested in contributing to Ponder, please read the [contribution gu
165
161
 
166
162
  ## Packages
167
163
 
168
- - `ponder`
169
- - `@ponder/client`
170
- - `@ponder/react`
171
- - `@ponder/utils`
172
- - `create-ponder`
173
- - `eslint-config-ponder`
164
+ - [`ponder`](https://www.npmjs.com/package/ponder)
165
+ - [`@ponder/client`](https://www.npmjs.com/package/@ponder/client)
166
+ - [`@ponder/react`](https://www.npmjs.com/package/@ponder/react)
167
+ - [`@ponder/utils`](https://www.npmjs.com/package/@ponder/utils)
168
+ - [`create-ponder`](https://www.npmjs.com/package/create-ponder)
169
+ - [`eslint-config-ponder`](https://www.npmjs.com/package/eslint-config-ponder)
174
170
 
175
171
  ## About
176
172
 
package/dist/index.js CHANGED
@@ -16,16 +16,19 @@ import { default as prompts } from "prompts";
16
16
  // package.json
17
17
  var package_default = {
18
18
  name: "create-ponder",
19
- version: "0.16.3",
19
+ version: "0.16.4",
20
20
  type: "module",
21
- description: "A CLI tool to create Ponder apps",
21
+ description: "CLI tool to create Ponder projects",
22
22
  license: "MIT",
23
23
  repository: {
24
24
  type: "git",
25
25
  url: "https://github.com/ponder-sh/ponder",
26
26
  directory: "packages/create-ponder"
27
27
  },
28
- files: ["dist", "templates"],
28
+ files: [
29
+ "dist",
30
+ "templates"
31
+ ],
29
32
  bin: {
30
33
  "create-ponder": "./dist/index.js"
31
34
  },
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "create-ponder",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "type": "module",
5
- "description": "A CLI tool to create Ponder apps",
5
+ "description": "CLI tool to create Ponder projects",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",