create-ponder 0.0.10 → 0.0.11
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/dist/src/bin/create-ponder +25 -30
- package/dist/src/bin/create-ponder.d.ts +7 -0
- package/dist/src/helpers/detectPackageManager.d.ts +5 -0
- package/dist/src/helpers/detectPackageManager.js +65 -96
- package/dist/src/helpers/getEtherscanChainId.d.ts +4 -0
- package/dist/src/helpers/getEtherscanChainId.js +18 -46
- package/dist/src/helpers/getGraphProtocolChainId.d.ts +2 -0
- package/dist/src/helpers/getGraphProtocolChainId.js +36 -66
- package/dist/src/helpers/validateGraphProtocolSource.d.ts +27 -0
- package/dist/src/helpers/validateGraphProtocolSource.js +4 -32
- package/dist/src/index.d.ts +26 -0
- package/dist/src/index.js +92 -186
- package/dist/src/templates/basic.d.ts +3 -0
- package/dist/src/templates/basic.js +41 -86
- package/dist/src/templates/etherscan.d.ts +3 -0
- package/dist/src/templates/etherscan.js +102 -151
- package/dist/src/templates/subgraph.d.ts +3 -0
- package/dist/src/templates/subgraph.js +81 -136
- package/package.json +9 -18
|
@@ -1,45 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
6
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const cac_1 = require("cac");
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
const package_json_1 = __importDefault(require("../../../package.json"));
|
|
13
|
+
const cli = (0, cac_1.cac)(package_json_1.default.name)
|
|
14
|
+
.version(package_json_1.default.version)
|
|
15
|
+
.usage("[options]")
|
|
16
|
+
.help()
|
|
17
|
+
.option("--dir [path]", "Path to directory for generated project")
|
|
18
|
+
.option("--from-subgraph [path]", "Path to subgraph directory")
|
|
19
|
+
.option("--from-etherscan [url]", "Link to etherscan contract page")
|
|
20
|
+
.option("--etherscan-api-key [key]", "Etherscan API key");
|
|
28
21
|
const parsed = cli.parse(process.argv);
|
|
29
22
|
const options = parsed.options;
|
|
30
23
|
if (options.help) {
|
|
31
|
-
|
|
24
|
+
process.exit(0);
|
|
32
25
|
}
|
|
26
|
+
// Validate CLI options.
|
|
33
27
|
if (options.fromSubgraph && options.fromEtherscan) {
|
|
34
|
-
|
|
28
|
+
throw new Error(`Cannot specify more than one "--from" option:
|
|
35
29
|
--from-subgraph
|
|
36
30
|
--from-etherscan
|
|
37
31
|
`);
|
|
38
32
|
}
|
|
39
33
|
const validatedOptions = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
// Default `dir` to "ponder".
|
|
35
|
+
ponderRootDir: node_path_1.default.resolve(".", options.dir ? options.dir : "ponder"),
|
|
36
|
+
fromSubgraph: options.fromSubgraph,
|
|
37
|
+
fromEtherscan: options.fromEtherscan,
|
|
38
|
+
etherscanApiKey: options.etherscanApiKey,
|
|
44
39
|
};
|
|
45
40
|
require("../index").run(validatedOptions);
|
|
@@ -1,109 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
4
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (
|
|
24
|
-
(target = mod != null ? __create(__getProtoOf(mod)) : {}),
|
|
25
|
-
__copyProps(
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule
|
|
27
|
-
? __defProp(target, "default", { value: mod, enumerable: true })
|
|
28
|
-
: target,
|
|
29
|
-
mod
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
var __toCommonJS = (mod) =>
|
|
33
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
-
var detectPackageManager_exports = {};
|
|
35
|
-
__export(detectPackageManager_exports, {
|
|
36
|
-
detect: () => detect,
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(detectPackageManager_exports);
|
|
39
|
-
var import_execa = __toESM(require("execa"));
|
|
40
|
-
var import_fs = require("fs");
|
|
41
|
-
var import_path = require("path");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.detect = void 0;
|
|
7
|
+
// Adapted from https://github.com/egoist/detect-package-manager
|
|
8
|
+
const execa_1 = __importDefault(require("execa"));
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const path_1 = require("path");
|
|
42
11
|
async function pathExists(p) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
12
|
+
try {
|
|
13
|
+
await fs_1.promises.access(p);
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
49
19
|
}
|
|
50
|
-
const cache =
|
|
20
|
+
const cache = new Map();
|
|
51
21
|
function hasGlobalInstallation(pm) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
22
|
+
const key = `has_global_${pm}`;
|
|
23
|
+
if (cache.has(key)) {
|
|
24
|
+
return Promise.resolve(cache.get(key));
|
|
25
|
+
}
|
|
26
|
+
return (0, execa_1.default)(pm, ["--version"])
|
|
27
|
+
.then((res) => {
|
|
28
|
+
return /^\d+.\d+.\d+$/.test(res.stdout);
|
|
59
29
|
})
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
30
|
+
.then((value) => {
|
|
31
|
+
cache.set(key, value);
|
|
32
|
+
return value;
|
|
63
33
|
})
|
|
64
|
-
|
|
34
|
+
.catch(() => false);
|
|
65
35
|
}
|
|
66
36
|
function getTypeofLockFile(cwd = ".") {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
return Promise.all([
|
|
72
|
-
pathExists((0, import_path.resolve)(cwd, "yarn.lock")),
|
|
73
|
-
pathExists((0, import_path.resolve)(cwd, "package-lock.json")),
|
|
74
|
-
pathExists((0, import_path.resolve)(cwd, "pnpm-lock.yaml")),
|
|
75
|
-
]).then(([isYarn, isNpm, isPnpm]) => {
|
|
76
|
-
let value = null;
|
|
77
|
-
if (isYarn) {
|
|
78
|
-
value = "yarn";
|
|
79
|
-
} else if (isPnpm) {
|
|
80
|
-
value = "pnpm";
|
|
81
|
-
} else if (isNpm) {
|
|
82
|
-
value = "npm";
|
|
37
|
+
const key = `lockfile_${cwd}`;
|
|
38
|
+
if (cache.has(key)) {
|
|
39
|
+
return Promise.resolve(cache.get(key));
|
|
83
40
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
return Promise.all([
|
|
42
|
+
pathExists((0, path_1.resolve)(cwd, "yarn.lock")),
|
|
43
|
+
pathExists((0, path_1.resolve)(cwd, "package-lock.json")),
|
|
44
|
+
pathExists((0, path_1.resolve)(cwd, "pnpm-lock.yaml")),
|
|
45
|
+
]).then(([isYarn, isNpm, isPnpm]) => {
|
|
46
|
+
let value = null;
|
|
47
|
+
if (isYarn) {
|
|
48
|
+
value = "yarn";
|
|
49
|
+
}
|
|
50
|
+
else if (isPnpm) {
|
|
51
|
+
value = "pnpm";
|
|
52
|
+
}
|
|
53
|
+
else if (isNpm) {
|
|
54
|
+
value = "npm";
|
|
55
|
+
}
|
|
56
|
+
cache.set(key, value);
|
|
57
|
+
return value;
|
|
58
|
+
});
|
|
87
59
|
}
|
|
88
60
|
const detect = async ({ cwd } = {}) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
61
|
+
const type = await getTypeofLockFile(cwd);
|
|
62
|
+
if (type) {
|
|
63
|
+
return type;
|
|
64
|
+
}
|
|
65
|
+
const [hasYarn, hasPnpm] = await Promise.all([
|
|
66
|
+
hasGlobalInstallation("yarn"),
|
|
67
|
+
hasGlobalInstallation("pnpm"),
|
|
68
|
+
]);
|
|
69
|
+
// Prefer pnpm, yarn, then npm
|
|
70
|
+
if (hasPnpm) {
|
|
71
|
+
return "pnpm";
|
|
72
|
+
}
|
|
73
|
+
if (hasYarn) {
|
|
74
|
+
return "yarn";
|
|
75
|
+
}
|
|
76
|
+
return "npm";
|
|
104
77
|
};
|
|
105
|
-
|
|
106
|
-
0 &&
|
|
107
|
-
(module.exports = {
|
|
108
|
-
detect,
|
|
109
|
-
});
|
|
78
|
+
exports.detect = detect;
|
|
@@ -1,51 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if ((from && typeof from === "object") || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var getEtherscanChainId_exports = {};
|
|
24
|
-
__export(getEtherscanChainId_exports, {
|
|
25
|
-
getNetworkByEtherscanHostname: () => getNetworkByEtherscanHostname,
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(getEtherscanChainId_exports);
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNetworkByEtherscanHostname = void 0;
|
|
28
4
|
const networkByEtherscanHostname = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
5
|
+
"etherscan.io": { name: "mainnet", chainId: 1 },
|
|
6
|
+
"ropsten.etherscan.io": { name: "ropsten", chainId: 3 },
|
|
7
|
+
"rinkeby.etherscan.io": { name: "rinkeby", chainId: 4 },
|
|
8
|
+
"goerli.etherscan.io": { name: "goerli", chainId: 5 },
|
|
9
|
+
"kovan.etherscan.io": { name: "kovan", chainId: 42 },
|
|
10
|
+
"sepolia.etherscan.io": { name: "sepolia", chainId: 11155111 },
|
|
11
|
+
"optimistic.etherscan.io": { name: "optimism", chainId: 10 },
|
|
12
|
+
"kovan-optimistic.etherscan.io": { name: "optimism-kovan", chainId: 69 },
|
|
13
|
+
"goerli-optimism.etherscan.io": { name: "optimism-goerli", chainId: 420 },
|
|
14
|
+
"polygonscan.com": { name: "polygon", chainId: 137 },
|
|
15
|
+
"mumbai.polygonscan.com": { name: "polygon-mumbai", chainId: 80001 },
|
|
16
|
+
"arbiscan.io": { name: "arbitrum", chainId: 42161 },
|
|
17
|
+
"testnet.arbiscan.io": { name: "arbitrum-rinkeby", chainId: 421611 },
|
|
18
|
+
"goerli.arbiscan.io": { name: "arbitrum-goerli", chainId: 421613 },
|
|
43
19
|
};
|
|
44
20
|
const getNetworkByEtherscanHostname = (hostname) => {
|
|
45
|
-
|
|
21
|
+
return networkByEtherscanHostname[hostname];
|
|
46
22
|
};
|
|
47
|
-
|
|
48
|
-
0 &&
|
|
49
|
-
(module.exports = {
|
|
50
|
-
getNetworkByEtherscanHostname,
|
|
51
|
-
});
|
|
23
|
+
exports.getNetworkByEtherscanHostname = getNetworkByEtherscanHostname;
|
|
@@ -1,71 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if ((from && typeof from === "object") || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var getGraphProtocolChainId_exports = {};
|
|
24
|
-
__export(getGraphProtocolChainId_exports, {
|
|
25
|
-
getGraphProtocolChainId: () => getGraphProtocolChainId,
|
|
26
|
-
subgraphYamlFileNames: () => subgraphYamlFileNames,
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(getGraphProtocolChainId_exports);
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subgraphYamlFileNames = exports.getGraphProtocolChainId = void 0;
|
|
4
|
+
// https://github.com/graphprotocol/graph-cli/blob/main/src/protocols/index.js#L40
|
|
5
|
+
// https://chainlist.org/
|
|
29
6
|
const chainIdByGraphNetwork = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
7
|
+
mainnet: 1,
|
|
8
|
+
kovan: 42,
|
|
9
|
+
rinkeby: 4,
|
|
10
|
+
ropsten: 3,
|
|
11
|
+
goerli: 5,
|
|
12
|
+
"poa-core": 99,
|
|
13
|
+
"poa-sokol": 77,
|
|
14
|
+
xdai: 100,
|
|
15
|
+
matic: 137,
|
|
16
|
+
mumbai: 80001,
|
|
17
|
+
fantom: 250,
|
|
18
|
+
"fantom-testnet": 4002,
|
|
19
|
+
bsc: 56,
|
|
20
|
+
chapel: -1,
|
|
21
|
+
clover: 0,
|
|
22
|
+
avalanche: 43114,
|
|
23
|
+
fuji: 43113,
|
|
24
|
+
celo: 42220,
|
|
25
|
+
"celo-alfajores": 44787,
|
|
26
|
+
fuse: 122,
|
|
27
|
+
moonbeam: 1284,
|
|
28
|
+
moonriver: 1285,
|
|
29
|
+
mbase: -1,
|
|
30
|
+
"arbitrum-one": 42161,
|
|
31
|
+
"arbitrum-rinkeby": 421611,
|
|
32
|
+
optimism: 10,
|
|
33
|
+
"optimism-kovan": 69,
|
|
34
|
+
aurora: 1313161554,
|
|
35
|
+
"aurora-testnet": 1313161555,
|
|
59
36
|
};
|
|
60
37
|
const getGraphProtocolChainId = (networkName) => {
|
|
61
|
-
|
|
38
|
+
return chainIdByGraphNetwork[networkName];
|
|
62
39
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
);
|
|
66
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
-
0 &&
|
|
68
|
-
(module.exports = {
|
|
69
|
-
getGraphProtocolChainId,
|
|
70
|
-
subgraphYamlFileNames,
|
|
71
|
-
});
|
|
40
|
+
exports.getGraphProtocolChainId = getGraphProtocolChainId;
|
|
41
|
+
exports.subgraphYamlFileNames = ["subgraph.yaml"].concat(Object.keys(chainIdByGraphNetwork).map((n) => `subgraph-${n}.yaml`));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare type GraphSource = {
|
|
2
|
+
kind: string;
|
|
3
|
+
name: string;
|
|
4
|
+
network: string;
|
|
5
|
+
source: {
|
|
6
|
+
address: string;
|
|
7
|
+
abi: string;
|
|
8
|
+
startBlock?: number;
|
|
9
|
+
};
|
|
10
|
+
mapping: {
|
|
11
|
+
kind: string;
|
|
12
|
+
apiVersion: string;
|
|
13
|
+
language: string;
|
|
14
|
+
entities: string[];
|
|
15
|
+
abis: {
|
|
16
|
+
name: string;
|
|
17
|
+
file: string;
|
|
18
|
+
}[];
|
|
19
|
+
eventHandlers?: {
|
|
20
|
+
event: string;
|
|
21
|
+
handler: string;
|
|
22
|
+
topic0?: string;
|
|
23
|
+
}[];
|
|
24
|
+
file: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const validateGraphProtocolSource: (source: unknown) => GraphSource;
|
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if ((from && typeof from === "object") || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var validateGraphProtocolSource_exports = {};
|
|
24
|
-
__export(validateGraphProtocolSource_exports, {
|
|
25
|
-
validateGraphProtocolSource: () => validateGraphProtocolSource,
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(validateGraphProtocolSource_exports);
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateGraphProtocolSource = void 0;
|
|
28
4
|
const validateGraphProtocolSource = (source) => {
|
|
29
|
-
|
|
5
|
+
return source;
|
|
30
6
|
};
|
|
31
|
-
|
|
32
|
-
0 &&
|
|
33
|
-
(module.exports = {
|
|
34
|
-
validateGraphProtocolSource,
|
|
35
|
-
});
|
|
7
|
+
exports.validateGraphProtocolSource = validateGraphProtocolSource;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CreatePonderOptions } from "./bin/create-ponder";
|
|
2
|
+
export declare type PonderNetwork = {
|
|
3
|
+
kind?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
chainId: number;
|
|
6
|
+
rpcUrl: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type PonderSource = {
|
|
9
|
+
kind?: "evm";
|
|
10
|
+
name: string;
|
|
11
|
+
network: string;
|
|
12
|
+
abi: string;
|
|
13
|
+
address: string;
|
|
14
|
+
startBlock?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare type PartialPonderConfig = {
|
|
17
|
+
plugins: string[];
|
|
18
|
+
database: {
|
|
19
|
+
kind: string;
|
|
20
|
+
};
|
|
21
|
+
networks: PonderNetwork[];
|
|
22
|
+
sources: PonderSource[];
|
|
23
|
+
};
|
|
24
|
+
export declare const run: (options: CreatePonderOptions, overrides?: {
|
|
25
|
+
installCommand?: string;
|
|
26
|
+
}) => Promise<void>;
|