scripts/environmentGeneration/README.md
This directory contains scripts for generating environment-specific configuration files from Google Sheets data.
processDevKeys.jsGenerates dev key configuration files for different environments.
Input:
Output:
devkeys/ directory:
localDevKeys.jsondevnetDevKeys.jsonstagenetDevKeys.jsontestnetDevKeys.jsonmainnetDevKeys.jsonFormat:
{
"devPublicKeys": {
"public_key_1": 3,
"public_key_2": 3
}
}
processMultisigKeys.jsGenerates multisig key configuration files for different environments.
Input:
Output:
multisigkeys/ directory:
local.jsondevnet.jsonstagenet.jsontestnet.jsonmainnet.jsonFormat:
{
"multisigKeys": ["key1", "key2"],
"changeDevKey": ["key3", "key4"],
"changeMultiSigKeyList": ["key5"],
"initiateSecureAccountTransfer": ["key6"],
"changeNonKeyConfigs": ["key7"]
}
generateGenesis.jsGenerates genesis configuration files for different environments.
Input:
Output:
genesis/ directory:
local.jsondevnet.jsonstagenet.jsontestnet.jsonmainnet.jsonFormat:
{
"alloc": {
"address1": "amount_in_wei1",
"address2": "amount_in_wei2"
}
}
Ensure you have the required dependencies installed:
npm install
Set up Google Sheets authentication:
# Install the googleapis package
npm install googleapis
# Run the token generation script
node src/getToken.js
googleSheets.jsMake sure you have access to the Google Sheet and the necessary OAuth2 credentials are set up in googleSheets.js
Run the scripts:
npm run process:devkeys
npm run process:multisig
npm run generate:genesis
SPREADSHEET_ID in googleSheets.js with your sheet's IDgetToken.js:
CLIENT_ID with your client IDCLIENT_SECRET with your client secretREDIRECT_URI with your redirect URI (default is http://localhost:3010)node src/getToken.js to generate the access tokengoogleSheets.js