diff --git a/deployment/README.md b/deployment/README.md index 15aed89bb..fe311c9da 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -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 diff --git a/deployment/testnet/wallets.js b/deployment/testnet/wallets.js new file mode 100644 index 000000000..eea2b5a89 --- /dev/null +++ b/deployment/testnet/wallets.js @@ -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); +});