@graphprotocol/graph-cli 0.38.0-alpha-20230131175746-0102e0f → 0.38.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/CHANGELOG.md +5 -1
- package/dist/bin.js +3 -31
- package/dist/cli.js +26 -0
- package/dist/command-helpers/scaffold.js +2 -1
- package/dist/commands/add.js +183 -25
- package/dist/commands/auth.js +122 -0
- package/dist/commands/build.js +136 -0
- package/dist/commands/codegen.js +128 -0
- package/dist/commands/create.js +94 -0
- package/dist/commands/deploy.js +335 -0
- package/dist/commands/init.js +817 -0
- package/dist/commands/local.js +380 -0
- package/dist/commands/remove.js +95 -0
- package/dist/commands/test.js +293 -0
- package/dist/protocols/ethereum/scaffold/manifest.js +6 -1
- package/dist/scaffold/ethereum.test.js +2 -0
- package/dist/scaffold/index.js +1 -0
- package/package.json +3 -10
- package/dist/index.js +0 -5
- package/oclif.manifest.json +0 -44
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const child_process_1 = require("child_process");
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const binary_install_raw_1 = require("binary-install-raw");
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
11
|
+
const gluegun_1 = require("gluegun");
|
|
12
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
13
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
14
|
+
const semver_1 = __importDefault(require("semver"));
|
|
15
|
+
const gluegun_2 = require("../command-helpers/gluegun");
|
|
16
|
+
const HELP = `
|
|
17
|
+
${chalk_1.default.bold('graph test')} ${chalk_1.default.dim('[options]')} ${chalk_1.default.bold('<datasource>')}
|
|
18
|
+
|
|
19
|
+
${chalk_1.default.dim('Options:')}
|
|
20
|
+
-c, --coverage Run the tests in coverage mode
|
|
21
|
+
-d, --docker Run the tests in a docker container(Note: Please execute from the root folder of the subgraph)
|
|
22
|
+
-f --force Binary - overwrites folder + file when downloading. Docker - rebuilds the docker image
|
|
23
|
+
-h, --help Show usage information
|
|
24
|
+
-l, --logs Logs to the console information about the OS, CPU model and download url (debugging purposes)
|
|
25
|
+
-r, --recompile Force-recompile tests
|
|
26
|
+
-v, --version <tag> Choose the version of the rust binary that you want to be downloaded/used
|
|
27
|
+
`;
|
|
28
|
+
exports.default = {
|
|
29
|
+
description: 'Runs rust binary for subgraph testing',
|
|
30
|
+
run: async (toolbox) => {
|
|
31
|
+
// Read CLI parameters
|
|
32
|
+
const { c, coverage, d, docker, f, force, h, help, l, logs, r, recompile, v, version } = toolbox.parameters.options;
|
|
33
|
+
const testsFolder = './tests';
|
|
34
|
+
const opts = {
|
|
35
|
+
testsFolder,
|
|
36
|
+
cachePath: path_1.default.join(testsFolder, '.latest.json'),
|
|
37
|
+
};
|
|
38
|
+
// Support both long and short option variants
|
|
39
|
+
opts.coverage = coverage || c;
|
|
40
|
+
opts.docker = docker || d;
|
|
41
|
+
opts.force = force || f;
|
|
42
|
+
opts.help = help || h;
|
|
43
|
+
opts.logs = logs || l;
|
|
44
|
+
opts.recompile = recompile || r;
|
|
45
|
+
opts.version = version || v;
|
|
46
|
+
// Fix if a boolean flag (e.g -c, --coverage) has an argument
|
|
47
|
+
try {
|
|
48
|
+
(0, gluegun_2.fixParameters)(toolbox.parameters, {
|
|
49
|
+
h,
|
|
50
|
+
help,
|
|
51
|
+
c,
|
|
52
|
+
coverage,
|
|
53
|
+
d,
|
|
54
|
+
docker,
|
|
55
|
+
f,
|
|
56
|
+
force,
|
|
57
|
+
l,
|
|
58
|
+
logs,
|
|
59
|
+
r,
|
|
60
|
+
recompile,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
gluegun_1.print.error(e.message);
|
|
65
|
+
process.exitCode = 1;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const datasource = toolbox.parameters.first || toolbox.parameters.array?.[0];
|
|
69
|
+
// Show help text if requested
|
|
70
|
+
if (opts.help) {
|
|
71
|
+
gluegun_1.print.info(HELP);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// Check if matchstick.yaml config exists
|
|
75
|
+
if (gluegun_1.filesystem.exists('matchstick.yaml')) {
|
|
76
|
+
try {
|
|
77
|
+
// Load the config
|
|
78
|
+
const config = await js_yaml_1.default.load(gluegun_1.filesystem.read('matchstick.yaml', 'utf8'));
|
|
79
|
+
// Check if matchstick.yaml and testsFolder not null
|
|
80
|
+
if (config?.testsFolder) {
|
|
81
|
+
// assign test folder from matchstick.yaml if present
|
|
82
|
+
opts.testsFolder = config.testsFolder;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
gluegun_1.print.info('A problem occurred while reading matchstick.yaml. Please attend to the errors below:');
|
|
87
|
+
gluegun_1.print.error(error.message);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
setVersionFromCache(opts);
|
|
92
|
+
// Fetch the latest version tag if version is not specified with -v/--version or if the version is not cached
|
|
93
|
+
if (opts.force || (!opts.version && !opts.latestVersion)) {
|
|
94
|
+
gluegun_1.print.info('Fetching latest version tag');
|
|
95
|
+
const result = await (0, node_fetch_1.default)('https://api.github.com/repos/LimeChain/matchstick/releases/latest');
|
|
96
|
+
const json = await result.json();
|
|
97
|
+
opts.latestVersion = json.tag_name;
|
|
98
|
+
gluegun_1.filesystem.file(opts.cachePath, {
|
|
99
|
+
content: {
|
|
100
|
+
version: json.tag_name,
|
|
101
|
+
timestamp: Date.now(),
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
if (opts.docker) {
|
|
106
|
+
runDocker(datasource, opts);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
runBinary(datasource, opts);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
async function setVersionFromCache(opts) {
|
|
114
|
+
if (gluegun_1.filesystem.exists(opts.cachePath) == 'file') {
|
|
115
|
+
const cached = gluegun_1.filesystem.read(opts.cachePath, 'json');
|
|
116
|
+
// Get the cache age in days
|
|
117
|
+
const cacheAge = (Date.now() - cached.timestamp) / (1000 * 60 * 60 * 24);
|
|
118
|
+
// If cache age is less than 1 day, use the cached version
|
|
119
|
+
if (cacheAge < 1) {
|
|
120
|
+
opts.latestVersion = cached.version;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function runBinary(datasource, opts) {
|
|
125
|
+
const coverageOpt = opts.coverage;
|
|
126
|
+
const forceOpt = opts.force;
|
|
127
|
+
const logsOpt = opts.logs;
|
|
128
|
+
const versionOpt = opts.version;
|
|
129
|
+
const latestVersion = opts.latestVersion;
|
|
130
|
+
const recompileOpt = opts.recompile;
|
|
131
|
+
const platform = await getPlatform(logsOpt);
|
|
132
|
+
const url = `https://github.com/LimeChain/matchstick/releases/download/${versionOpt || latestVersion}/${platform}`;
|
|
133
|
+
if (logsOpt) {
|
|
134
|
+
gluegun_1.print.info(`Download link: ${url}`);
|
|
135
|
+
}
|
|
136
|
+
const binary = new binary_install_raw_1.Binary(platform, url, versionOpt || latestVersion);
|
|
137
|
+
forceOpt ? await binary.install(true) : await binary.install(false);
|
|
138
|
+
const args = [];
|
|
139
|
+
if (coverageOpt)
|
|
140
|
+
args.push('-c');
|
|
141
|
+
if (recompileOpt)
|
|
142
|
+
args.push('-r');
|
|
143
|
+
if (datasource)
|
|
144
|
+
args.push(datasource);
|
|
145
|
+
args.length > 0 ? binary.run(...args) : binary.run();
|
|
146
|
+
}
|
|
147
|
+
async function getPlatform(logsOpt) {
|
|
148
|
+
const type = os_1.default.type();
|
|
149
|
+
const arch = os_1.default.arch();
|
|
150
|
+
const cpuCore = os_1.default.cpus()[0];
|
|
151
|
+
const isAppleSilicon = arch === 'arm64' && /Apple (M1|M2|processor)/.test(cpuCore.model);
|
|
152
|
+
const linuxInfo = type === 'Linux' ? await getLinuxInfo() : {};
|
|
153
|
+
const linuxDistro = linuxInfo.name;
|
|
154
|
+
const release = linuxInfo.version || os_1.default.release();
|
|
155
|
+
const majorVersion = parseInt(linuxInfo.version || '', 10) || semver_1.default.major(release);
|
|
156
|
+
if (logsOpt) {
|
|
157
|
+
gluegun_1.print.info(`OS type: ${linuxDistro || type}\nOS arch: ${arch}\nOS release: ${release}\nOS major version: ${majorVersion}\nCPU model: ${cpuCore.model}`);
|
|
158
|
+
}
|
|
159
|
+
if (arch === 'x64' || isAppleSilicon) {
|
|
160
|
+
if (type === 'Darwin') {
|
|
161
|
+
if (majorVersion === 18 || majorVersion === 19) {
|
|
162
|
+
return 'binary-macos-10.15'; // GitHub dropped support for macOS 10.14 in Actions, but it seems 10.15 binary works on 10.14 too
|
|
163
|
+
}
|
|
164
|
+
if (isAppleSilicon) {
|
|
165
|
+
return 'binary-macos-11-m1';
|
|
166
|
+
}
|
|
167
|
+
return 'binary-macos-11';
|
|
168
|
+
}
|
|
169
|
+
if (type === 'Linux') {
|
|
170
|
+
if (majorVersion === 18) {
|
|
171
|
+
return 'binary-linux-18';
|
|
172
|
+
}
|
|
173
|
+
if (majorVersion === 22) {
|
|
174
|
+
return 'binary-linux-22';
|
|
175
|
+
}
|
|
176
|
+
return 'binary-linux-20';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
throw new Error(`Unsupported platform: ${type} ${arch} ${majorVersion}`);
|
|
180
|
+
}
|
|
181
|
+
async function getLinuxInfo() {
|
|
182
|
+
try {
|
|
183
|
+
const result = await gluegun_1.system.run("cat /etc/*-release | grep -E '(^VERSION|^NAME)='", {
|
|
184
|
+
trim: true,
|
|
185
|
+
});
|
|
186
|
+
const infoArray = result
|
|
187
|
+
.replace(/['"]+/g, '')
|
|
188
|
+
.split('\n')
|
|
189
|
+
.map(p => p.split('='));
|
|
190
|
+
const linuxInfo = {};
|
|
191
|
+
infoArray.forEach(val => {
|
|
192
|
+
linuxInfo[val[0].toLowerCase()] = val[1];
|
|
193
|
+
});
|
|
194
|
+
return linuxInfo;
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
gluegun_1.print.error(`Error fetching the Linux version:\n ${error}`);
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
async function runDocker(datasource, opts) {
|
|
202
|
+
const coverageOpt = opts.coverage;
|
|
203
|
+
const forceOpt = opts.force;
|
|
204
|
+
const versionOpt = opts.version;
|
|
205
|
+
const latestVersion = opts.latestVersion;
|
|
206
|
+
const recompileOpt = opts.recompile;
|
|
207
|
+
// Remove binary-install-raw binaries, because docker has permission issues
|
|
208
|
+
// when building the docker images
|
|
209
|
+
gluegun_1.filesystem.remove('./node_modules/binary-install-raw/bin');
|
|
210
|
+
// Get current working directory
|
|
211
|
+
const current_folder = gluegun_1.filesystem.cwd();
|
|
212
|
+
// Declate dockerfilePath with default location
|
|
213
|
+
const dockerfilePath = path_1.default.join(opts.testsFolder || 'tests', '.docker/Dockerfile');
|
|
214
|
+
// Check if the Dockerfil already exists
|
|
215
|
+
const dockerfileExists = gluegun_1.filesystem.exists(dockerfilePath);
|
|
216
|
+
// Generate the Dockerfile only if it doesn't exists,
|
|
217
|
+
// version flag and/or force flag is passed.
|
|
218
|
+
if (!dockerfileExists || versionOpt || forceOpt) {
|
|
219
|
+
await dockerfile(dockerfilePath, versionOpt, latestVersion);
|
|
220
|
+
}
|
|
221
|
+
// Run a command to check if matchstick image already exists
|
|
222
|
+
(0, child_process_1.exec)('docker images -q matchstick', (_error, stdout, _stderr) => {
|
|
223
|
+
// Collect all(if any) flags and options that have to be passed to the matchstick binary
|
|
224
|
+
let testArgs = '';
|
|
225
|
+
if (coverageOpt)
|
|
226
|
+
testArgs = testArgs + ' -c';
|
|
227
|
+
if (recompileOpt)
|
|
228
|
+
testArgs = testArgs + ' -r';
|
|
229
|
+
if (datasource)
|
|
230
|
+
testArgs = testArgs + ' ' + datasource;
|
|
231
|
+
// Build the `docker run` command options and flags
|
|
232
|
+
const dockerRunOpts = [
|
|
233
|
+
'run',
|
|
234
|
+
'-it',
|
|
235
|
+
'--rm',
|
|
236
|
+
'--mount',
|
|
237
|
+
`type=bind,source=${current_folder},target=/matchstick`,
|
|
238
|
+
];
|
|
239
|
+
if (testArgs !== '') {
|
|
240
|
+
dockerRunOpts.push('-e');
|
|
241
|
+
dockerRunOpts.push(`ARGS=${testArgs.trim()}`);
|
|
242
|
+
}
|
|
243
|
+
dockerRunOpts.push('matchstick');
|
|
244
|
+
// If a matchstick image does not exists, the command returns an empty string,
|
|
245
|
+
// else it'll return the image ID. Skip `docker build` if an image already exists
|
|
246
|
+
// Delete current image(if any) and rebuild.
|
|
247
|
+
// Use spawn() and {stdio: 'inherit'} so we can see the logs in real time.
|
|
248
|
+
if (!dockerfileExists || stdout === '' || versionOpt || forceOpt) {
|
|
249
|
+
if (stdout !== '') {
|
|
250
|
+
(0, child_process_1.exec)('docker image rm matchstick', (_error, stdout, _stderr) => {
|
|
251
|
+
gluegun_1.print.info(chalk_1.default.bold(`Removing matchstick image\n${stdout}`));
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
// Build a docker image. If the process has executed successfully
|
|
255
|
+
// run a container from that image.
|
|
256
|
+
(0, child_process_1.spawn)('docker', ['build', '-f', dockerfilePath, '-t', 'matchstick', '.'], {
|
|
257
|
+
stdio: 'inherit',
|
|
258
|
+
}).on('close', code => {
|
|
259
|
+
if (code === 0) {
|
|
260
|
+
(0, child_process_1.spawn)('docker', dockerRunOpts, { stdio: 'inherit' });
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
gluegun_1.print.info('Docker image already exists. Skipping `docker build` command.');
|
|
266
|
+
// Run the container from the existing matchstick docker image
|
|
267
|
+
(0, child_process_1.spawn)('docker', dockerRunOpts, { stdio: 'inherit' });
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
// Downloads Dockerfile template from the demo-subgraph repo
|
|
272
|
+
// Replaces the placeholders with their respective values
|
|
273
|
+
async function dockerfile(dockerfilePath, versionOpt, latestVersion) {
|
|
274
|
+
const spinner = gluegun_1.print.spin('Generating Dockerfile...');
|
|
275
|
+
try {
|
|
276
|
+
// Fetch the Dockerfile template content from the demo-subgraph repo
|
|
277
|
+
const content = await (0, node_fetch_1.default)('https://raw.githubusercontent.com/LimeChain/demo-subgraph/main/Dockerfile').then(response => {
|
|
278
|
+
if (response.ok) {
|
|
279
|
+
return response.text();
|
|
280
|
+
}
|
|
281
|
+
throw new Error(`Status Code: ${response.status}, with error: ${response.statusText}`);
|
|
282
|
+
});
|
|
283
|
+
// Write the Dockerfile
|
|
284
|
+
gluegun_1.filesystem.write(dockerfilePath, content);
|
|
285
|
+
// Replaces the version placeholders
|
|
286
|
+
await gluegun_1.patching.replace(dockerfilePath, '<MATCHSTICK_VERSION>', versionOpt || latestVersion || 'unknown');
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
spinner.fail(`A problem occurred while generating the Dockerfile. Please attend to the errors below:\n ${error.message}`);
|
|
290
|
+
process.exit(1);
|
|
291
|
+
}
|
|
292
|
+
spinner.succeed('Successfully generated Dockerfile.');
|
|
293
|
+
}
|
|
@@ -7,7 +7,12 @@ exports.mapping = exports.source = void 0;
|
|
|
7
7
|
const gluegun_1 = require("gluegun");
|
|
8
8
|
const schema_1 = require("../../../scaffold/schema");
|
|
9
9
|
const abi_1 = __importDefault(require("../abi"));
|
|
10
|
-
const source = ({ contract, contractName }) =>
|
|
10
|
+
const source = ({ contract, contractName, startBlock, }) => startBlock
|
|
11
|
+
? `
|
|
12
|
+
address: '${contract}'
|
|
13
|
+
abi: ${contractName}
|
|
14
|
+
startBlock: ${startBlock}`
|
|
15
|
+
: `
|
|
11
16
|
address: '${contract}'
|
|
12
17
|
abi: ${contractName}`;
|
|
13
18
|
exports.source = source;
|
|
@@ -62,6 +62,7 @@ const scaffoldOptions = {
|
|
|
62
62
|
contract: '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d',
|
|
63
63
|
network: 'kovan',
|
|
64
64
|
contractName: 'Contract',
|
|
65
|
+
startBlock: '12345',
|
|
65
66
|
};
|
|
66
67
|
const scaffold = new index_1.default(scaffoldOptions);
|
|
67
68
|
const scaffoldWithIndexEvents = new index_1.default({
|
|
@@ -81,6 +82,7 @@ dataSources:
|
|
|
81
82
|
source:
|
|
82
83
|
address: "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d"
|
|
83
84
|
abi: Contract
|
|
85
|
+
startBlock: 12345
|
|
84
86
|
mapping:
|
|
85
87
|
kind: ethereum/events
|
|
86
88
|
apiVersion: 0.0.7
|
package/dist/scaffold/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.38.0
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "CLI for building for and deploying to The Graph",
|
|
5
5
|
"license": "(Apache-2.0 OR MIT)",
|
|
6
6
|
"engines": {
|
|
@@ -9,16 +9,14 @@
|
|
|
9
9
|
"bin": {
|
|
10
10
|
"graph": "dist/bin.js"
|
|
11
11
|
},
|
|
12
|
-
"main": "dist/
|
|
12
|
+
"main": "dist/cli.js",
|
|
13
13
|
"files": [
|
|
14
14
|
"CHANGELOG.md",
|
|
15
15
|
"dist",
|
|
16
|
-
"oclif.manifest.json",
|
|
17
16
|
"README.md"
|
|
18
17
|
],
|
|
19
18
|
"dependencies": {
|
|
20
19
|
"@float-capital/float-subgraph-uncrashable": "^0.0.0-alpha.4",
|
|
21
|
-
"@oclif/core": "2.0.7",
|
|
22
20
|
"assemblyscript": "0.19.23",
|
|
23
21
|
"binary-install-raw": "0.0.13",
|
|
24
22
|
"chalk": "3.0.0",
|
|
@@ -54,7 +52,6 @@
|
|
|
54
52
|
"@types/which": "^2.0.1",
|
|
55
53
|
"copyfiles": "^2.4.1",
|
|
56
54
|
"jest": "26.0.0",
|
|
57
|
-
"oclif": "3.6.1",
|
|
58
55
|
"spawn-command": "0.0.2-1",
|
|
59
56
|
"strip-ansi": "6.0.0",
|
|
60
57
|
"tern": "0.24.3",
|
|
@@ -63,12 +60,8 @@
|
|
|
63
60
|
"publishConfig": {
|
|
64
61
|
"access": "public"
|
|
65
62
|
},
|
|
66
|
-
"oclif": {
|
|
67
|
-
"bin": "graph",
|
|
68
|
-
"commands": "./dist/commands"
|
|
69
|
-
},
|
|
70
63
|
"scripts": {
|
|
71
|
-
"build": "tsc -b tsconfig.build.json &&
|
|
64
|
+
"build": "tsc -b tsconfig.build.json && copyfiles -u 1 src/**/*.graphql dist/ && chmod +x ./dist/bin.js",
|
|
72
65
|
"test": "jest --verbose",
|
|
73
66
|
"test:init": "jest tests/cli/init.test.ts --verbose",
|
|
74
67
|
"test:validation": "jest tests/cli/validation.test.ts --verbose",
|
package/dist/index.js
DELETED
package/oclif.manifest.json
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.38.0-alpha-20230131175746-0102e0f",
|
|
3
|
-
"commands": {
|
|
4
|
-
"add": {
|
|
5
|
-
"id": "add",
|
|
6
|
-
"description": "Adds a new datasource to a subgraph.",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"pluginName": "@graphprotocol/graph-cli",
|
|
9
|
-
"pluginAlias": "@graphprotocol/graph-cli",
|
|
10
|
-
"pluginType": "core",
|
|
11
|
-
"aliases": [],
|
|
12
|
-
"flags": {
|
|
13
|
-
"abi": {
|
|
14
|
-
"name": "abi",
|
|
15
|
-
"type": "option",
|
|
16
|
-
"summary": "Path to the contract ABI.",
|
|
17
|
-
"multiple": false,
|
|
18
|
-
"default": "*Download from Etherscan*"
|
|
19
|
-
},
|
|
20
|
-
"contractName": {
|
|
21
|
-
"name": "contractName",
|
|
22
|
-
"type": "option",
|
|
23
|
-
"summary": "Name of the contract.",
|
|
24
|
-
"multiple": false,
|
|
25
|
-
"default": "Contract"
|
|
26
|
-
},
|
|
27
|
-
"mergeEntities": {
|
|
28
|
-
"name": "mergeEntities",
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"summary": "Whether to merge entities with the same name.",
|
|
31
|
-
"allowNo": false
|
|
32
|
-
},
|
|
33
|
-
"networkFile": {
|
|
34
|
-
"name": "networkFile",
|
|
35
|
-
"type": "option",
|
|
36
|
-
"summary": "Networks config file path.",
|
|
37
|
-
"multiple": false,
|
|
38
|
-
"default": "networks.json"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"args": {}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|