mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
This PR contains improvements to the DataHaven deployment infrastructure: 1. Directory restructure: Moved from `deployment/` to `deploy/` (more common for K8s / Helm -based deployment configs). 2. Added **local environment** support: updated CLI to support deploying to a local K8s cluster. 3. Manual deployment script: `deploy/scripts/deploy.sh` for manual deployments. 4. Environment-specific configurations: Structured values files for each environment. 5. Chart organization: Renamed bridges-common-relay to relay for clarity. --------- Co-authored-by: Gonza Montiel <gon.montiel@gmail.com> Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
33 lines
914 B
TypeScript
33 lines
914 B
TypeScript
import { fundValidators } from "scripts/fund-validators";
|
|
import { setupValidators } from "scripts/setup-validators";
|
|
import { updateValidatorSet } from "scripts/update-validator-set";
|
|
import { logger, printDivider } from "utils";
|
|
import type { DeployOptions } from "..";
|
|
|
|
export const performValidatorOperations = async (options: DeployOptions, networkRpcUrl: string) => {
|
|
if (options.skipValidatorOperations) {
|
|
logger.info("🏳️ Skipping validator operations");
|
|
printDivider();
|
|
return;
|
|
}
|
|
|
|
// If not specified, prompt for funding
|
|
const shouldFundValidators = options.isPrivateNetwork;
|
|
|
|
if (shouldFundValidators) {
|
|
await fundValidators({
|
|
rpcUrl: networkRpcUrl
|
|
});
|
|
} else {
|
|
logger.info("👍 Skipping validator funding");
|
|
printDivider();
|
|
}
|
|
|
|
await setupValidators({
|
|
rpcUrl: networkRpcUrl
|
|
});
|
|
|
|
await updateValidatorSet({
|
|
rpcUrl: networkRpcUrl
|
|
});
|
|
};
|