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.
Files changed (95) hide show
  1. package/README.md +7 -7
  2. package/dist/index.js +9 -4
  3. package/package.json +1 -1
  4. package/templates/empty/package.json +2 -1
  5. package/templates/empty/ponder-env.d.ts +11 -24
  6. package/templates/empty/ponder.config.ts +1 -1
  7. package/templates/empty/ponder.schema.ts +1 -1
  8. package/templates/empty/src/api/index.ts +2 -2
  9. package/templates/empty/src/index.ts +1 -1
  10. package/templates/etherscan/package.json +2 -1
  11. package/templates/etherscan/ponder-env.d.ts +11 -24
  12. package/templates/etherscan/ponder.schema.ts +1 -1
  13. package/templates/feature-accounts/_dot_env.local +5 -0
  14. package/templates/feature-accounts/_dot_eslintrc.json +3 -0
  15. package/templates/feature-accounts/_dot_gitignore +18 -0
  16. package/templates/feature-accounts/package.json +28 -0
  17. package/templates/feature-accounts/ponder-env.d.ts +15 -0
  18. package/templates/feature-accounts/ponder.config.ts +22 -0
  19. package/templates/feature-accounts/ponder.schema.ts +7 -0
  20. package/templates/feature-accounts/src/index.ts +22 -0
  21. package/templates/feature-accounts/tsconfig.json +26 -0
  22. package/templates/feature-api-functions/package.json +2 -3
  23. package/templates/feature-api-functions/ponder-env.d.ts +11 -23
  24. package/templates/feature-api-functions/ponder.config.ts +1 -1
  25. package/templates/feature-api-functions/ponder.schema.ts +1 -1
  26. package/templates/feature-api-functions/src/api/index.ts +3 -3
  27. package/templates/feature-api-functions/src/index.ts +2 -2
  28. package/templates/feature-blocks/package.json +2 -1
  29. package/templates/feature-blocks/ponder-env.d.ts +11 -23
  30. package/templates/feature-blocks/ponder.config.ts +1 -1
  31. package/templates/feature-blocks/ponder.schema.ts +1 -1
  32. package/templates/feature-blocks/src/index.ts +2 -2
  33. package/templates/feature-call-traces/package.json +2 -1
  34. package/templates/feature-call-traces/ponder-env.d.ts +11 -23
  35. package/templates/feature-call-traces/ponder.config.ts +2 -2
  36. package/templates/feature-call-traces/ponder.schema.ts +1 -1
  37. package/templates/feature-call-traces/src/index.ts +2 -2
  38. package/templates/feature-factory/package.json +2 -1
  39. package/templates/feature-factory/ponder-env.d.ts +11 -23
  40. package/templates/feature-factory/ponder.config.ts +6 -5
  41. package/templates/feature-factory/ponder.schema.ts +1 -1
  42. package/templates/feature-factory/src/LlamaCore.ts +1 -1
  43. package/templates/feature-filter/package.json +2 -1
  44. package/templates/feature-filter/ponder-env.d.ts +11 -23
  45. package/templates/feature-filter/ponder.config.ts +1 -1
  46. package/templates/feature-filter/ponder.schema.ts +1 -1
  47. package/templates/feature-filter/src/index.ts +2 -2
  48. package/templates/feature-multichain/package.json +2 -1
  49. package/templates/feature-multichain/ponder-env.d.ts +11 -23
  50. package/templates/feature-multichain/ponder.config.ts +1 -1
  51. package/templates/feature-multichain/ponder.schema.ts +1 -1
  52. package/templates/feature-multichain/src/index.ts +2 -2
  53. package/templates/feature-proxy/package.json +2 -1
  54. package/templates/feature-proxy/ponder-env.d.ts +11 -23
  55. package/templates/feature-proxy/ponder.config.ts +1 -1
  56. package/templates/feature-proxy/ponder.schema.ts +1 -1
  57. package/templates/feature-proxy/src/index.ts +2 -2
  58. package/templates/feature-read-contract/package.json +2 -1
  59. package/templates/feature-read-contract/ponder-env.d.ts +11 -23
  60. package/templates/feature-read-contract/ponder.config.ts +1 -1
  61. package/templates/feature-read-contract/ponder.schema.ts +1 -1
  62. package/templates/feature-read-contract/src/FileStore.ts +2 -2
  63. package/templates/project-friendtech/package.json +2 -1
  64. package/templates/project-friendtech/ponder-env.d.ts +11 -23
  65. package/templates/project-friendtech/ponder.config.ts +1 -1
  66. package/templates/project-friendtech/ponder.schema.ts +1 -1
  67. package/templates/project-friendtech/src/FriendtechSharesV1.ts +2 -2
  68. package/templates/project-uniswap-v3-flash/package.json +2 -1
  69. package/templates/project-uniswap-v3-flash/ponder-env.d.ts +11 -23
  70. package/templates/project-uniswap-v3-flash/ponder.config.ts +3 -3
  71. package/templates/project-uniswap-v3-flash/ponder.schema.ts +1 -1
  72. package/templates/project-uniswap-v3-flash/src/index.ts +2 -2
  73. package/templates/reference-erc1155/package.json +2 -1
  74. package/templates/reference-erc1155/ponder-env.d.ts +11 -23
  75. package/templates/reference-erc1155/ponder.config.ts +1 -1
  76. package/templates/reference-erc1155/ponder.schema.ts +1 -1
  77. package/templates/reference-erc1155/src/index.ts +2 -2
  78. package/templates/reference-erc20/package.json +2 -1
  79. package/templates/reference-erc20/ponder-env.d.ts +11 -23
  80. package/templates/reference-erc20/ponder.config.ts +1 -1
  81. package/templates/reference-erc20/ponder.schema.ts +1 -1
  82. package/templates/reference-erc20/src/index.ts +2 -2
  83. package/templates/reference-erc4626/package.json +2 -1
  84. package/templates/reference-erc4626/ponder-env.d.ts +11 -23
  85. package/templates/reference-erc4626/ponder.config.ts +1 -1
  86. package/templates/reference-erc4626/ponder.schema.ts +1 -1
  87. package/templates/reference-erc4626/src/index.ts +2 -2
  88. package/templates/reference-erc721/package.json +2 -1
  89. package/templates/reference-erc721/ponder-env.d.ts +11 -23
  90. package/templates/reference-erc721/ponder.config.ts +1 -1
  91. package/templates/reference-erc721/ponder.schema.ts +1 -1
  92. package/templates/reference-erc721/src/index.ts +2 -2
  93. package/templates/subgraph/package.json +2 -1
  94. package/templates/subgraph/ponder-env.d.ts +11 -29
  95. package/templates/subgraph/ponder.schema.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const multicall = onchainTable("multicall", (t) => ({
4
4
  from: t.hex().primaryKey(),
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import * as schema from "../ponder.schema";
1
+ import { ponder } from "ponder:registry";
2
+ import schema from "ponder:schema";
3
3
 
4
4
  ponder.on("multicall3.aggregate3()", async ({ event, context }) => {
5
5
  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
- "@ponder/core": "workspace:*",
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
- factory: {
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
- factory: {
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
  },
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const llama = onchainTable("llama", (t) => ({
4
4
  id: t.text().primaryKey(),
@@ -1,4 +1,4 @@
1
- import { ponder } from "@/generated";
1
+ import { ponder } from "ponder:registry";
2
2
 
3
3
  ponder.on("LlamaCore:ActionCreated", async ({ event }) => {
4
4
  console.log(
@@ -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
- "@ponder/core": "workspace:*",
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 "@ponder/core";
1
+ import { createConfig } from "ponder";
2
2
  import { http } from "viem";
3
3
 
4
4
  import { PrimitiveManagerAbi } from "./abis/PrimitiveManagerAbi";
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const swapEvent = onchainTable("swapEvent", (t) => ({
4
4
  id: t.text().primaryKey(),
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import * as schema from "../ponder.schema";
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
- "@ponder/core": "workspace:*",
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 "@ponder/core";
1
+ import { createConfig } from "ponder";
2
2
  import { http, createPublicClient } from "viem";
3
3
 
4
4
  import { weth9Abi } from "./abis/weth9Abi";
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const account = onchainTable("account", (t) => ({
4
4
  address: t.hex().primaryKey(),
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import { account } from "../ponder.schema";
1
+ import { ponder } from "ponder:registry";
2
+ import { account } from "ponder:schema";
3
3
 
4
4
  ponder.on("weth9:Deposit", async ({ event, context }) => {
5
5
  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
- "@ponder/core": "workspace:*",
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, mergeAbis } from "@ponder/core";
1
+ import { createConfig, mergeAbis } from "ponder";
2
2
  import { http } from "viem";
3
3
 
4
4
  import { RouterImplAbi } from "./abis/RouterImplAbi";
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const liquidationEvent = onchainTable("liquidation_event", (t) => ({
4
4
  id: t.text().primaryKey(),
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import * as schema from "../ponder.schema";
1
+ import { ponder } from "ponder:registry";
2
+ import schema from "ponder:schema";
3
3
 
4
4
  ponder.on("AstariaRouter:Liquidation", async ({ event, context }) => {
5
5
  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
- "@ponder/core": "workspace:*",
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 "@ponder/core";
1
+ import { createConfig } from "ponder";
2
2
  import { http } from "viem";
3
3
 
4
4
  import { FileStoreAbi } from "./abis/FileStoreAbi";
@@ -1,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const file = onchainTable("file", (t) => ({
4
4
  name: t.text().primaryKey(),
@@ -1,8 +1,8 @@
1
- import { ponder } from "@/generated";
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
- "@ponder/core": "workspace:*",
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 "@ponder/core";
1
+ import { createConfig } from "ponder";
2
2
  import { http } from "viem";
3
3
 
4
4
  import { FriendtechSharesV1Abi } from "./abis/FriendtechSharesV1Abi";
@@ -1,4 +1,4 @@
1
- import { onchainEnum, onchainTable, primaryKey } from "@ponder/core";
1
+ import { onchainEnum, onchainTable, primaryKey } from "ponder";
2
2
 
3
3
  export const tradeType = onchainEnum("trade_type", ["BUY", "SELL"]);
4
4
 
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import * as schema from "../ponder.schema";
1
+ import { ponder } from "ponder:registry";
2
+ import schema from "ponder:schema";
3
3
 
4
4
  ponder.on("FriendtechSharesV1:Trade", async ({ event, context }) => {
5
5
  // Skip phantom events
@@ -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
- "@ponder/core": "workspace:*",
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 "@ponder/core";
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
- factory: {
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,4 +1,4 @@
1
- import { onchainTable } from "@ponder/core";
1
+ import { onchainTable } from "ponder";
2
2
 
3
3
  export const tokenPaid = onchainTable("token_paid", (t) => ({
4
4
  address: t.hex().primaryKey(),
@@ -1,5 +1,5 @@
1
- import { ponder } from "@/generated";
2
- import * as schema from "../ponder.schema";
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
- "@ponder/core": "workspace:*",
15
+ "ponder": "workspace:*",
15
16
  "hono": "^4.5.0",
16
17
  "viem": "^2.21.3"
17
18
  },