@@ -10,47 +10,47 @@ npm i
1010
1111## Create wallets
1212
13- Next, create a ` wallets.js ` file.
13+ 1 . Create a ` wallets.js ` file.
1414
15- ``` sh
16- cd ~ /zkevm-contracts
17- nano wallets.js
18- ```
15+ ``` sh
16+ cd ~ /zkevm-contracts
17+ nano wallets.js
18+ ```
1919
20- Copy/paste the JavaScript code below.
21-
22- ``` js
23- const ethers = require (" ethers" );
24-
25- async function main () {
26- const arrayNames = [
27- " ## Deployment Address" ,
28- " \\ n\\ n## Trusted sequencer" ,
29- " \\ n\\ n## Trusted aggregator" ,
30- ];
31- for (let i = 0 ; i < arrayNames .length ; i++ ) {
32- const wallet = ethers .Wallet .createRandom ();
33- console .log (arrayNames[i]);
34- console .log (` Address: ${ wallet .address } ` );
35- console .log (` PrvKey: ${ wallet ._signingKey ().privateKey } ` );
36- console .log (` mnemonic: "${ wallet ._mnemonic ().phrase } "` );
37-
38- const keystoreJson = await wallet .encrypt (" password" );
39- console .log (` keystore: ${ keystoreJson} ` );
40- }
41- }
42-
43- main ().catch ((e ) => {
44- console .error (e);
45- process .exit (1 );
46- });
47- ```
20+ 2. Copy/paste the JavaScript code below.
21+
22+ ` ` ` js
23+ const ethers = require(" ethers" );
24+
25+ async function main() {
26+ const arrayNames = [
27+ " ## Deployment Address" ,
28+ " \\ n\\ n## Trusted sequencer" ,
29+ " \\ n\\ n## Trusted aggregator" ,
30+ ];
31+ for (let i = 0; i < arrayNames.length; i++) {
32+ const wallet = ethers.Wallet.createRandom ();
33+ console.log(arrayNames[i]);
34+ console.log(` Address: ${wallet.address} ` );
35+ console.log(` PrvKey: ${wallet._signingKey ().privateKey}` );
36+ console.log(` mnemonic: " ${wallet._mnemonic().phrase} " ` );
37+
38+ const keystoreJson = await wallet.encrypt(" password" );
39+ console.log(` keystore: ${keystoreJson} ` );
40+ }
41+ }
42+
43+ main ().catch(( e) => {
44+ console.error(e);
45+ process.exit(1 );
46+ });
47+ ```
4848
49- Generate the wallets using below command:
49+ 3 . Generate the wallets.
5050
51- ``` sh
52- node wallets.js | tee wallets.txt
53- ```
51+ ```sh
52+ node wallets.js | tee wallets.txt
53+ ```
5454
5555## Prepare environment variables
5656
0 commit comments