From 653f78af199b2269bb11c47d58a5697dfafe7332 Mon Sep 17 00:00:00 2001 From: Artyom Veremeenko Date: Tue, 10 Oct 2023 17:41:52 +0300 Subject: [PATCH] refactor(deployed-testnet-defaults.json): use `null` for unspecified --- SCRATCH_DEPLOY.md | 2 +- deployed-testnet-defaults.json | 8 ++++---- scripts/scratch/00-populate-deploy-artifact-from-env.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SCRATCH_DEPLOY.md b/SCRATCH_DEPLOY.md index dfa5d0b03..9b4971f53 100644 --- a/SCRATCH_DEPLOY.md +++ b/SCRATCH_DEPLOY.md @@ -11,7 +11,7 @@ The repo contains bash scripts which allow to deploy the DAO under multiple envi - local node (ganache, anvil, hardhat network) - `dao-local-deploy.sh` - goerli testnet - `dao-goerli-deploy.sh` -The protocol has a bunch of parameters to configure for the scratch deployment. The default configuration is stored in files `deployed--defaults.json`, where `` is the target environment. Currently there is single default configuration `deployed-testnet-defaults.json` suitable for testnet deployments. Compared to the mainnet configuration, it has lower vote durations, more frequent oracle report cycles, etc. +The protocol has a bunch of parameters to configure for the scratch deployment. The default configuration is stored in files `deployed--defaults.json`, where `` is the target environment. Currently there is single default configuration `deployed-testnet-defaults.json` suitable for testnet deployments. Compared to the mainnet configuration, it has lower vote durations, more frequent oracle report cycles, etc. Part of the parameters require further specification -- they are marked with `null` values. During the deployment, the "default" configuration is copied to `deployed-.json`, where `` is the name of a network configuration defined in `hardhat.config.js`. The file `deployed-.json` gets populated with the contract addresses and transaction hashes during the deployment process. These are the deployment setups, supported currently: diff --git a/deployed-testnet-defaults.json b/deployed-testnet-defaults.json index ab5fe9e7c..f070bd7cb 100644 --- a/deployed-testnet-defaults.json +++ b/deployed-testnet-defaults.json @@ -1,7 +1,7 @@ { - "deployer": "", + "deployer": null, "gateSeal": { - "factoryAddress": "", + "factoryAddress": null, "sealDuration": 518400, "expiryTimestamp": 1714521600 }, @@ -11,8 +11,8 @@ "chainSpec": { "slotsPerEpoch": 32, "secondsPerSlot": 12, - "genesisTime": 0, - "depositContract": "" + "genesisTime": null, + "depositContract": null }, "daoInitialSettings": { "voting": { diff --git a/scripts/scratch/00-populate-deploy-artifact-from-env.js b/scripts/scratch/00-populate-deploy-artifact-from-env.js index 5c961de3e..b510563e8 100644 --- a/scripts/scratch/00-populate-deploy-artifact-from-env.js +++ b/scripts/scratch/00-populate-deploy-artifact-from-env.js @@ -22,7 +22,7 @@ async function saveDeployParameters({ web3, artifacts }) { const state = readNetworkState(network.name, netId) const ldoHolder = Object.keys(state.vestingParams.holders)[0] - const gateSealAddress = (GATE_SEAL_FACTORY === "" || GATE_SEAL_FACTORY === ZERO_ADDRESS) + const gateSealAddress = (GATE_SEAL_FACTORY === null || GATE_SEAL_FACTORY === ZERO_ADDRESS) ? ZERO_ADDRESS : '' state.chainId = CHAIN_ID