Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ cp .env.example .env
Fill `.env` with your `MNEMONIC` and `INFURA_PROJECT_ID`
If you want to verify the contracts also fill the `ETHERSCAN_API_KEY`

For testnet usage you can generate wallets with the wallet.js script

Navigate to `testnet` folder and run

`node wallet.js`

or from root directory
`npx hardhat run deployment/testnet/wallets.js`

```
cd deployment
cp deploy_parameters.json.example deploy_parameters.json
Expand Down
26 changes: 26 additions & 0 deletions deployment/testnet/wallets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable no-await-in-loop, no-use-before-define, no-lonely-if, no-restricted-syntax */
/* eslint-disable no-console, no-inner-declarations, no-undef, import/no-unresolved */
const { ethers } = require('hardhat');

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);
});