Skip to content

Commit

Permalink
Merge branch 'km/cdk-qs-rollup' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kmurphypolygon committed Jan 19, 2024
2 parents 96be556 + 34155dd commit 6efa8a0
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions docs/cdk/get-started/deploy-rollup/create-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,47 @@ npm i

## Create wallets

Next, create a `wallets.js` file.
1. Create a `wallets.js` file.

```sh
cd ~/zkevm-contracts
nano wallets.js
```
```sh
cd ~/zkevm-contracts
nano wallets.js
```

Copy/paste the JavaScript code below.

```js
const ethers = require("ethers");

async function main() {
const arrayNames = [
"## Deployment Address",
"\\n\\n## Trusted sequencer",
"\\n\\n## Trusted aggregator",
];
for (let i = 0; i < arrayNames.length; i++) {
const wallet = ethers.Wallet.createRandom();
console.log(arrayNames[i]);
console.log(`Address: ${wallet.address}`);
console.log(`PrvKey: ${wallet._signingKey().privateKey}`);
console.log(`mnemonic: "${wallet._mnemonic().phrase}"`);

const keystoreJson = await wallet.encrypt("password");
console.log(`keystore: ${keystoreJson}`);
}
}

main().catch((e) => {
console.error(e);
process.exit(1);
});
```
2. Copy/paste the JavaScript code below.

```js
const ethers = require("ethers");
async function main() {
const arrayNames = [
"## Deployment Address",
"\\n\\n## Trusted sequencer",
"\\n\\n## Trusted aggregator",
];
for (let i = 0; i < arrayNames.length; i++) {
const wallet = ethers.Wallet.createRandom();
console.log(arrayNames[i]);
console.log(`Address: ${wallet.address}`);
console.log(`PrvKey: ${wallet._signingKey().privateKey}`);
console.log(`mnemonic: "${wallet._mnemonic().phrase}"`);
const keystoreJson = await wallet.encrypt("password");
console.log(`keystore: ${keystoreJson}`);
}
}
main().catch((e) => {
console.error(e);
process.exit(1);
});
```
Generate the wallets using below command:
3. Generate the wallets.
```sh
node wallets.js | tee wallets.txt
```
```sh
node wallets.js | tee wallets.txt
```
## Prepare environment variables
Expand Down

0 comments on commit 6efa8a0

Please sign in to comment.