create-ponder 0.7.17 → 0.8.0
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.
- package/README.md +7 -7
- package/dist/index.js +9 -4
- package/package.json +1 -1
- package/templates/empty/package.json +2 -1
- package/templates/empty/ponder-env.d.ts +11 -24
- package/templates/empty/ponder.config.ts +1 -1
- package/templates/empty/ponder.schema.ts +1 -1
- package/templates/empty/src/api/index.ts +2 -2
- package/templates/empty/src/index.ts +1 -1
- package/templates/etherscan/package.json +2 -1
- package/templates/etherscan/ponder-env.d.ts +11 -24
- package/templates/etherscan/ponder.schema.ts +1 -1
- package/templates/feature-accounts/_dot_env.local +5 -0
- package/templates/feature-accounts/_dot_eslintrc.json +3 -0
- package/templates/feature-accounts/_dot_gitignore +18 -0
- package/templates/feature-accounts/package.json +28 -0
- package/templates/feature-accounts/ponder-env.d.ts +15 -0
- package/templates/feature-accounts/ponder.config.ts +22 -0
- package/templates/feature-accounts/ponder.schema.ts +7 -0
- package/templates/feature-accounts/src/index.ts +22 -0
- package/templates/feature-accounts/tsconfig.json +26 -0
- package/templates/feature-api-functions/package.json +2 -3
- package/templates/feature-api-functions/ponder-env.d.ts +11 -23
- package/templates/feature-api-functions/ponder.config.ts +1 -1
- package/templates/feature-api-functions/ponder.schema.ts +1 -1
- package/templates/feature-api-functions/src/api/index.ts +3 -3
- package/templates/feature-api-functions/src/index.ts +2 -2
- package/templates/feature-blocks/package.json +2 -1
- package/templates/feature-blocks/ponder-env.d.ts +11 -23
- package/templates/feature-blocks/ponder.config.ts +1 -1
- package/templates/feature-blocks/ponder.schema.ts +1 -1
- package/templates/feature-blocks/src/index.ts +2 -2
- package/templates/feature-call-traces/package.json +2 -1
- package/templates/feature-call-traces/ponder-env.d.ts +11 -23
- package/templates/feature-call-traces/ponder.config.ts +2 -2
- package/templates/feature-call-traces/ponder.schema.ts +1 -1
- package/templates/feature-call-traces/src/index.ts +2 -2
- package/templates/feature-factory/package.json +2 -1
- package/templates/feature-factory/ponder-env.d.ts +11 -23
- package/templates/feature-factory/ponder.config.ts +6 -5
- package/templates/feature-factory/ponder.schema.ts +1 -1
- package/templates/feature-factory/src/LlamaCore.ts +1 -1
- package/templates/feature-filter/package.json +2 -1
- package/templates/feature-filter/ponder-env.d.ts +11 -23
- package/templates/feature-filter/ponder.config.ts +1 -1
- package/templates/feature-filter/ponder.schema.ts +1 -1
- package/templates/feature-filter/src/index.ts +2 -2
- package/templates/feature-multichain/package.json +2 -1
- package/templates/feature-multichain/ponder-env.d.ts +11 -23
- package/templates/feature-multichain/ponder.config.ts +1 -1
- package/templates/feature-multichain/ponder.schema.ts +1 -1
- package/templates/feature-multichain/src/index.ts +2 -2
- package/templates/feature-proxy/package.json +2 -1
- package/templates/feature-proxy/ponder-env.d.ts +11 -23
- package/templates/feature-proxy/ponder.config.ts +1 -1
- package/templates/feature-proxy/ponder.schema.ts +1 -1
- package/templates/feature-proxy/src/index.ts +2 -2
- package/templates/feature-read-contract/package.json +2 -1
- package/templates/feature-read-contract/ponder-env.d.ts +11 -23
- package/templates/feature-read-contract/ponder.config.ts +1 -1
- package/templates/feature-read-contract/ponder.schema.ts +1 -1
- package/templates/feature-read-contract/src/FileStore.ts +2 -2
- package/templates/project-friendtech/package.json +2 -1
- package/templates/project-friendtech/ponder-env.d.ts +11 -23
- package/templates/project-friendtech/ponder.config.ts +1 -1
- package/templates/project-friendtech/ponder.schema.ts +1 -1
- package/templates/project-friendtech/src/FriendtechSharesV1.ts +2 -2
- package/templates/project-uniswap-v3-flash/package.json +2 -1
- package/templates/project-uniswap-v3-flash/ponder-env.d.ts +11 -23
- package/templates/project-uniswap-v3-flash/ponder.config.ts +3 -3
- package/templates/project-uniswap-v3-flash/ponder.schema.ts +1 -1
- package/templates/project-uniswap-v3-flash/src/index.ts +2 -2
- package/templates/reference-erc1155/package.json +2 -1
- package/templates/reference-erc1155/ponder-env.d.ts +11 -23
- package/templates/reference-erc1155/ponder.config.ts +1 -1
- package/templates/reference-erc1155/ponder.schema.ts +1 -1
- package/templates/reference-erc1155/src/index.ts +2 -2
- package/templates/reference-erc20/package.json +2 -1
- package/templates/reference-erc20/ponder-env.d.ts +11 -23
- package/templates/reference-erc20/ponder.config.ts +1 -1
- package/templates/reference-erc20/ponder.schema.ts +1 -1
- package/templates/reference-erc20/src/index.ts +2 -2
- package/templates/reference-erc4626/package.json +2 -1
- package/templates/reference-erc4626/ponder-env.d.ts +11 -23
- package/templates/reference-erc4626/ponder.config.ts +1 -1
- package/templates/reference-erc4626/ponder.schema.ts +1 -1
- package/templates/reference-erc4626/src/index.ts +2 -2
- package/templates/reference-erc721/package.json +2 -1
- package/templates/reference-erc721/ponder-env.d.ts +11 -23
- package/templates/reference-erc721/ponder.config.ts +1 -1
- package/templates/reference-erc721/ponder.schema.ts +1 -1
- package/templates/reference-erc721/src/index.ts +2 -2
- package/templates/subgraph/package.json +2 -1
- package/templates/subgraph/ponder-env.d.ts +11 -29
- package/templates/subgraph/ponder.schema.ts +1 -1
|
@@ -1,27 +1,15 @@
|
|
|
1
|
+
/// <reference types="ponder/virtual" />
|
|
2
|
+
|
|
3
|
+
declare module "ponder:internal" {
|
|
4
|
+
const config: typeof import("./ponder.config.ts");
|
|
5
|
+
const schema: typeof import("./ponder.schema.ts");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "ponder:schema" {
|
|
9
|
+
export * from "./ponder.schema.ts";
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// This file enables type checking and editor autocomplete for this Ponder project.
|
|
2
13
|
// After upgrading, you may find that changes have been made to this file.
|
|
3
14
|
// If this happens, please commit the changes. Do not manually edit this file.
|
|
4
15
|
// See https://ponder.sh/docs/getting-started/installation#typescript for more information.
|
|
5
|
-
|
|
6
|
-
declare module "@/generated" {
|
|
7
|
-
import type { Virtual } from "@ponder/core";
|
|
8
|
-
|
|
9
|
-
type config = typeof import("./ponder.config.ts").default;
|
|
10
|
-
type schema = typeof import("./ponder.schema.ts");
|
|
11
|
-
|
|
12
|
-
export const ponder: Virtual.Registry<config, schema>;
|
|
13
|
-
|
|
14
|
-
export type EventNames = Virtual.EventNames<config>;
|
|
15
|
-
export type Event<name extends EventNames = EventNames> = Virtual.Event<
|
|
16
|
-
config,
|
|
17
|
-
name
|
|
18
|
-
>;
|
|
19
|
-
export type Context<name extends EventNames = EventNames> = Virtual.Context<
|
|
20
|
-
config,
|
|
21
|
-
schema,
|
|
22
|
-
name
|
|
23
|
-
>;
|
|
24
|
-
export type ApiContext = Virtual.ApiContext<schema>;
|
|
25
|
-
export type IndexingFunctionArgs<name extends EventNames = EventNames> =
|
|
26
|
-
Virtual.IndexingFunctionArgs<config, schema, name>;
|
|
27
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ponder } from "
|
|
2
|
-
import
|
|
1
|
+
import { ponder } from "ponder:registry";
|
|
2
|
+
import schema from "ponder:schema";
|
|
3
3
|
|
|
4
4
|
ponder.on("ERC1155:TransferSingle", async ({ event, context }) => {
|
|
5
5
|
// Create an Account for the sender, or update the balance if it already exists.
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "ponder dev",
|
|
7
7
|
"start": "ponder start",
|
|
8
|
+
"db": "ponder db",
|
|
8
9
|
"codegen": "ponder codegen",
|
|
9
10
|
"serve": "ponder serve",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"typecheck": "tsc"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
+
"ponder": "workspace:*",
|
|
15
16
|
"drizzle-kit": "0.22.8",
|
|
16
17
|
"hono": "^4.5.0",
|
|
17
18
|
"viem": "^2.21.3"
|
|
@@ -1,27 +1,15 @@
|
|
|
1
|
+
/// <reference types="ponder/virtual" />
|
|
2
|
+
|
|
3
|
+
declare module "ponder:internal" {
|
|
4
|
+
const config: typeof import("./ponder.config.ts");
|
|
5
|
+
const schema: typeof import("./ponder.schema.ts");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "ponder:schema" {
|
|
9
|
+
export * from "./ponder.schema.ts";
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// This file enables type checking and editor autocomplete for this Ponder project.
|
|
2
13
|
// After upgrading, you may find that changes have been made to this file.
|
|
3
14
|
// If this happens, please commit the changes. Do not manually edit this file.
|
|
4
15
|
// See https://ponder.sh/docs/getting-started/installation#typescript for more information.
|
|
5
|
-
|
|
6
|
-
declare module "@/generated" {
|
|
7
|
-
import type { Virtual } from "@ponder/core";
|
|
8
|
-
|
|
9
|
-
type config = typeof import("./ponder.config.ts").default;
|
|
10
|
-
type schema = typeof import("./ponder.schema.ts");
|
|
11
|
-
|
|
12
|
-
export const ponder: Virtual.Registry<config, schema>;
|
|
13
|
-
|
|
14
|
-
export type EventNames = Virtual.EventNames<config>;
|
|
15
|
-
export type Event<name extends EventNames = EventNames> = Virtual.Event<
|
|
16
|
-
config,
|
|
17
|
-
name
|
|
18
|
-
>;
|
|
19
|
-
export type Context<name extends EventNames = EventNames> = Virtual.Context<
|
|
20
|
-
config,
|
|
21
|
-
schema,
|
|
22
|
-
name
|
|
23
|
-
>;
|
|
24
|
-
export type ApiContext = Virtual.ApiContext<schema>;
|
|
25
|
-
export type IndexingFunctionArgs<name extends EventNames = EventNames> =
|
|
26
|
-
Virtual.IndexingFunctionArgs<config, schema, name>;
|
|
27
|
-
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ponder } from "
|
|
1
|
+
import { ponder } from "ponder:registry";
|
|
2
2
|
import {
|
|
3
3
|
account,
|
|
4
4
|
allowance,
|
|
5
5
|
approvalEvent,
|
|
6
6
|
transferEvent,
|
|
7
|
-
} from "
|
|
7
|
+
} from "ponder:schema";
|
|
8
8
|
|
|
9
9
|
ponder.on("ERC20:Transfer", async ({ event, context }) => {
|
|
10
10
|
await context.db
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "ponder dev",
|
|
7
7
|
"start": "ponder start",
|
|
8
|
+
"db": "ponder db",
|
|
8
9
|
"codegen": "ponder codegen",
|
|
9
10
|
"serve": "ponder serve",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"typecheck": "tsc"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
+
"ponder": "workspace:*",
|
|
15
16
|
"hono": "^4.5.0",
|
|
16
17
|
"viem": "^2.21.3"
|
|
17
18
|
},
|
|
@@ -1,27 +1,15 @@
|
|
|
1
|
+
/// <reference types="ponder/virtual" />
|
|
2
|
+
|
|
3
|
+
declare module "ponder:internal" {
|
|
4
|
+
const config: typeof import("./ponder.config.ts");
|
|
5
|
+
const schema: typeof import("./ponder.schema.ts");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "ponder:schema" {
|
|
9
|
+
export * from "./ponder.schema.ts";
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// This file enables type checking and editor autocomplete for this Ponder project.
|
|
2
13
|
// After upgrading, you may find that changes have been made to this file.
|
|
3
14
|
// If this happens, please commit the changes. Do not manually edit this file.
|
|
4
15
|
// See https://ponder.sh/docs/getting-started/installation#typescript for more information.
|
|
5
|
-
|
|
6
|
-
declare module "@/generated" {
|
|
7
|
-
import type { Virtual } from "@ponder/core";
|
|
8
|
-
|
|
9
|
-
type config = typeof import("./ponder.config.ts").default;
|
|
10
|
-
type schema = typeof import("./ponder.schema.ts");
|
|
11
|
-
|
|
12
|
-
export const ponder: Virtual.Registry<config, schema>;
|
|
13
|
-
|
|
14
|
-
export type EventNames = Virtual.EventNames<config>;
|
|
15
|
-
export type Event<name extends EventNames = EventNames> = Virtual.Event<
|
|
16
|
-
config,
|
|
17
|
-
name
|
|
18
|
-
>;
|
|
19
|
-
export type Context<name extends EventNames = EventNames> = Virtual.Context<
|
|
20
|
-
config,
|
|
21
|
-
schema,
|
|
22
|
-
name
|
|
23
|
-
>;
|
|
24
|
-
export type ApiContext = Virtual.ApiContext<schema>;
|
|
25
|
-
export type IndexingFunctionArgs<name extends EventNames = EventNames> =
|
|
26
|
-
Virtual.IndexingFunctionArgs<config, schema, name>;
|
|
27
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ponder } from "
|
|
2
|
-
import
|
|
1
|
+
import { ponder } from "ponder:registry";
|
|
2
|
+
import schema from "ponder:schema";
|
|
3
3
|
|
|
4
4
|
ponder.on("ERC4626:Transfer", async ({ event, context }) => {
|
|
5
5
|
// Create an Account for the sender, or update the balance if it already exists.
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "ponder dev",
|
|
7
7
|
"start": "ponder start",
|
|
8
|
+
"db": "ponder db",
|
|
8
9
|
"codegen": "ponder codegen",
|
|
9
10
|
"serve": "ponder serve",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"typecheck": "tsc"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
+
"ponder": "workspace:*",
|
|
15
16
|
"hono": "^4.5.0",
|
|
16
17
|
"viem": "^2.21.3"
|
|
17
18
|
},
|
|
@@ -1,27 +1,15 @@
|
|
|
1
|
+
/// <reference types="ponder/virtual" />
|
|
2
|
+
|
|
3
|
+
declare module "ponder:internal" {
|
|
4
|
+
const config: typeof import("./ponder.config.ts");
|
|
5
|
+
const schema: typeof import("./ponder.schema.ts");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "ponder:schema" {
|
|
9
|
+
export * from "./ponder.schema.ts";
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// This file enables type checking and editor autocomplete for this Ponder project.
|
|
2
13
|
// After upgrading, you may find that changes have been made to this file.
|
|
3
14
|
// If this happens, please commit the changes. Do not manually edit this file.
|
|
4
15
|
// See https://ponder.sh/docs/getting-started/installation#typescript for more information.
|
|
5
|
-
|
|
6
|
-
declare module "@/generated" {
|
|
7
|
-
import type { Virtual } from "@ponder/core";
|
|
8
|
-
|
|
9
|
-
type config = typeof import("./ponder.config.ts").default;
|
|
10
|
-
type schema = typeof import("./ponder.schema.ts");
|
|
11
|
-
|
|
12
|
-
export const ponder: Virtual.Registry<config, schema>;
|
|
13
|
-
|
|
14
|
-
export type EventNames = Virtual.EventNames<config>;
|
|
15
|
-
export type Event<name extends EventNames = EventNames> = Virtual.Event<
|
|
16
|
-
config,
|
|
17
|
-
name
|
|
18
|
-
>;
|
|
19
|
-
export type Context<name extends EventNames = EventNames> = Virtual.Context<
|
|
20
|
-
config,
|
|
21
|
-
schema,
|
|
22
|
-
name
|
|
23
|
-
>;
|
|
24
|
-
export type ApiContext = Virtual.ApiContext<schema>;
|
|
25
|
-
export type IndexingFunctionArgs<name extends EventNames = EventNames> =
|
|
26
|
-
Virtual.IndexingFunctionArgs<config, schema, name>;
|
|
27
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ponder } from "
|
|
2
|
-
import
|
|
1
|
+
import { ponder } from "ponder:registry";
|
|
2
|
+
import schema from "ponder:schema";
|
|
3
3
|
|
|
4
4
|
ponder.on("ERC721:Transfer", async ({ event, context }) => {
|
|
5
5
|
// Create an Account for the sender, or update the balance if it already exists.
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "ponder dev",
|
|
8
8
|
"start": "ponder start",
|
|
9
|
+
"db": "ponder db",
|
|
9
10
|
"codegen": "ponder codegen",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"typecheck": "tsc"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
+
"ponder": "^0.0.95",
|
|
15
16
|
"hono": "^4.5.0",
|
|
16
17
|
"viem": "^2.21.3"
|
|
17
18
|
},
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
+
/// <reference types="ponder/virtual" />
|
|
2
|
+
|
|
3
|
+
declare module "ponder:internal" {
|
|
4
|
+
const config: typeof import("./ponder.config.ts");
|
|
5
|
+
const schema: typeof import("./ponder.schema.ts");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "ponder:schema" {
|
|
9
|
+
export * from "./ponder.schema.ts";
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
// This file enables type checking and editor autocomplete for this Ponder project.
|
|
2
13
|
// After upgrading, you may find that changes have been made to this file.
|
|
3
14
|
// If this happens, please commit the changes. Do not manually edit this file.
|
|
4
15
|
// See https://ponder.sh/docs/getting-started/installation#typescript for more information.
|
|
5
|
-
|
|
6
|
-
declare module "@/generated" {
|
|
7
|
-
import type {
|
|
8
|
-
PonderContext,
|
|
9
|
-
PonderEvent,
|
|
10
|
-
PonderEventNames,
|
|
11
|
-
PonderApp,
|
|
12
|
-
} from "@ponder/core";
|
|
13
|
-
|
|
14
|
-
type Config = typeof import("./ponder.config.ts").default;
|
|
15
|
-
type Schema = typeof import("./ponder.schema.ts").default;
|
|
16
|
-
|
|
17
|
-
export const ponder: PonderApp<Config, Schema>;
|
|
18
|
-
export type EventNames = PonderEventNames<Config>;
|
|
19
|
-
export type Event<name extends EventNames = EventNames> = PonderEvent<
|
|
20
|
-
Config,
|
|
21
|
-
name
|
|
22
|
-
>;
|
|
23
|
-
export type Context<name extends EventNames = EventNames> = PonderContext<
|
|
24
|
-
Config,
|
|
25
|
-
Schema,
|
|
26
|
-
name
|
|
27
|
-
>;
|
|
28
|
-
export type ApiContext = Virtual.Drizzle<schema>;
|
|
29
|
-
export type IndexingFunctionArgs<name extends EventNames = EventNames> = {
|
|
30
|
-
event: Event<name>;
|
|
31
|
-
context: Context<name>;
|
|
32
|
-
};
|
|
33
|
-
}
|