-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathindex.ts
More file actions
97 lines (95 loc) · 3.1 KB
/
index.ts
File metadata and controls
97 lines (95 loc) · 3.1 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import { hideBin } from "yargs/helpers";
import Yargs from "yargs/yargs";
import { stressOptions } from "./stress";
import { redisReadCommand, redisInitCommand } from "./redis";
import {
writeConfigCommand,
writeGethGenesisCommand,
writePrysmCommand,
writeL2ChainConfigCommand,
writeL3ChainConfigCommand,
writeL2DASCommitteeConfigCommand,
writeL2DASMirrorConfigCommand,
writeL2DASKeysetConfigCommand,
writeL2ReferenceDAConfigCommand,
writeTimeboostConfigsCommand
} from "./config";
import {
printAddressCommand,
namedAccountHelpString,
writeAccountsCommand,
printPrivateKeyCommand,
} from "./accounts";
import {
bridgeFundsCommand,
bridgeNativeTokenToL3Command,
bridgeToL3Command,
createERC20Command,
deployExpressLaneAuctionContractCommand,
createWETHCommand,
createStylusDeployerCommand,
transferERC20Command,
sendL1Command,
sendL2Command,
sendL3Command,
sendRPCCommand,
setValidKeysetCommand,
waitForSyncCommand,
transferL3ChainOwnershipCommand,
createFeeTokenPricerCommand,
} from "./ethcommands";
async function main() {
await Yargs(hideBin(process.argv))
.options({
redisUrl: { string: true, default: "redis://redis:6379" },
l1url: { string: true, default: "ws://geth:8546" },
l2url: { string: true, default: "ws://sequencer:8548" },
l3url: { string: true, default: "ws://l3node:3348" },
validationNodeUrl: { string: true, default: "ws://validation_node:8549" },
l2owner: { string: true, default: "0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E" },
committeeMember: { string: true, default: "not_set" },
usePredeploys: { boolean: true, default: false, describe: "Whether to include predeployed contracts in the genesis allocation" },
})
.options(stressOptions)
.command(bridgeFundsCommand)
.command(bridgeToL3Command)
.command(bridgeNativeTokenToL3Command)
.command(createERC20Command)
.command(createFeeTokenPricerCommand)
.command(deployExpressLaneAuctionContractCommand)
.command(createWETHCommand)
.command(createStylusDeployerCommand)
.command(transferERC20Command)
.command(sendL1Command)
.command(sendL2Command)
.command(sendL3Command)
.command(sendRPCCommand)
.command(setValidKeysetCommand)
.command(transferL3ChainOwnershipCommand)
.command(writeConfigCommand)
.command(writeGethGenesisCommand)
.command(writeL2ChainConfigCommand)
.command(writeL3ChainConfigCommand)
.command(writeL2DASCommitteeConfigCommand)
.command(writeL2DASMirrorConfigCommand)
.command(writeL2DASKeysetConfigCommand)
.command(writeL2ReferenceDAConfigCommand)
.command(writePrysmCommand)
.command(writeAccountsCommand)
.command(writeTimeboostConfigsCommand)
.command(printAddressCommand)
.command(printPrivateKeyCommand)
.command(redisReadCommand)
.command(redisInitCommand)
.command(waitForSyncCommand)
.strict()
.demandCommand(1, "a command must be specified")
.epilogue(namedAccountHelpString)
.help().argv;
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});