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
|
@@ -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
|
"abitype": "^0.10.2",
|
|
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,5 +1,6 @@
|
|
|
1
|
-
import { createConfig } from "@ponder/core";
|
|
2
1
|
import { parseAbiItem } from "abitype";
|
|
2
|
+
import { createConfig, factory } from "ponder";
|
|
3
|
+
|
|
3
4
|
import { http } from "viem";
|
|
4
5
|
|
|
5
6
|
import { LlamaCoreAbi } from "./abis/LlamaCoreAbi";
|
|
@@ -20,21 +21,21 @@ export default createConfig({
|
|
|
20
21
|
LlamaCore: {
|
|
21
22
|
network: "sepolia",
|
|
22
23
|
abi: LlamaCoreAbi,
|
|
23
|
-
|
|
24
|
+
address: factory({
|
|
24
25
|
address: "0xFf5d4E226D9A3496EECE31083a8F493edd79AbEB",
|
|
25
26
|
event: llamaFactoryEvent,
|
|
26
27
|
parameter: "llamaCore",
|
|
27
|
-
},
|
|
28
|
+
}),
|
|
28
29
|
startBlock: 4121269,
|
|
29
30
|
},
|
|
30
31
|
LlamaPolicy: {
|
|
31
32
|
network: "sepolia",
|
|
32
33
|
abi: LlamaPolicyAbi,
|
|
33
|
-
|
|
34
|
+
address: factory({
|
|
34
35
|
address: "0xFf5d4E226D9A3496EECE31083a8F493edd79AbEB",
|
|
35
36
|
event: llamaFactoryEvent,
|
|
36
37
|
parameter: "llamaPolicy",
|
|
37
|
-
},
|
|
38
|
+
}),
|
|
38
39
|
startBlock: 4121269,
|
|
39
40
|
},
|
|
40
41
|
},
|
|
@@ -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("PrimitiveManager:Swap", async ({ event, context }) => {
|
|
5
5
|
await context.db.insert(schema.swapEvent).values({
|
|
@@ -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
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -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,8 +1,8 @@
|
|
|
1
|
-
import { ponder } from "
|
|
1
|
+
import { ponder } from "ponder:registry";
|
|
2
|
+
import schema from "ponder:schema";
|
|
2
3
|
import type { Hex } from "viem";
|
|
3
4
|
import { fromHex } from "viem";
|
|
4
5
|
import { FileStoreFrontendAbi } from "../abis/FileStoreFrontendAbi";
|
|
5
|
-
import * as schema from "../ponder.schema";
|
|
6
6
|
|
|
7
7
|
const parseJson = (encodedJson: string, defaultValue: any = null) => {
|
|
8
8
|
try {
|
|
@@ -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
|
-
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { createConfig } from "
|
|
1
|
+
import { createConfig, factory } from "ponder";
|
|
2
2
|
import { http, getAbiItem } from "viem";
|
|
3
3
|
|
|
4
4
|
import { UniswapV3FactoryAbi } from "./abis/UniswapV3FactoryAbi";
|
|
@@ -15,11 +15,11 @@ export default createConfig({
|
|
|
15
15
|
UniswapV3Pool: {
|
|
16
16
|
network: "mainnet",
|
|
17
17
|
abi: UniswapV3PoolAbi,
|
|
18
|
-
|
|
18
|
+
address: factory({
|
|
19
19
|
address: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
|
|
20
20
|
event: getAbiItem({ abi: UniswapV3FactoryAbi, name: "PoolCreated" }),
|
|
21
21
|
parameter: "pool",
|
|
22
|
-
},
|
|
22
|
+
}),
|
|
23
23
|
startBlock: 12369621,
|
|
24
24
|
filter: {
|
|
25
25
|
event: "Flash",
|
|
@@ -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("UniswapV3Pool:Flash", async ({ event, context }) => {
|
|
5
5
|
const poolAddress = event.log.address;
|
|
@@ -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
|
},
|