-
Notifications
You must be signed in to change notification settings - Fork 3
/
parameters.js
67 lines (64 loc) · 1.63 KB
/
parameters.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
59
60
61
62
63
64
65
66
67
"use strict";
const path = require("path");
const abi = require("./abi");
const parameters = {
abi: abi.getABI(),
configFileName: path.join(process.cwd(), "snapshot.config.json"),
configQuestions: [
{
type: "input",
name: "provider",
message: "Enter the URL of web3 provider",
default: "http://localhost:8545"
},
{
type: "input",
name: "contractAddress",
message: "Enter your contract address"
},
{
type: "input",
name: "fromBlock",
message: "Enter the block number to start from",
default: 0
},
{
type: "input",
name: "toBlock",
message: "Enter the block number to end at",
default: "latest"
},
{
type: "input",
name: "blocksPerBatch",
message: "Blocks per batch",
default: 2500
},
{
type: "input",
name: "delay",
message: "Delay per iteration (ms)",
default: 0
},
{
type: "input",
name: "format",
message: "Format -> csv, json, both",
default: "both"
},
{
type: "input",
name: "checkIfContract",
message: "Check addresses if they are contracts or wallets?",
default: "yes"
}
],
knownTypes: path.join(process.cwd(), "/.cache/known-types.json"),
outputFileNameCSV: path.join(process.cwd(), "./balances/{token}.csv"),
outputFileNameJSON: path.join(process.cwd(), "./balances/{token}.json"),
eventsDownloadFolder: path.join(process.cwd(), "./tx/{token}/"),
eventsDownloadFilePath: path.join(process.cwd(), "./tx/{token}/{blockNumber}.json")
};
module.exports.get = () => {
return parameters;
};