From e9dececc6594f460a69c0cab2965b46f94d736a6 Mon Sep 17 00:00:00 2001 From: oceans404 Date: Fri, 29 Mar 2024 17:16:23 -0700 Subject: [PATCH] add nillion-devnet-stop command --- package.json | 3 ++- packages/nillion/bootstrap-local-env.sh | 12 +++++++----- packages/nillion/package.json | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 5e07d65..9328529 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "vercel": "yarn workspace @se-2/nextjs vercel", "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", "nillion": "yarn workspace @se-2/nillion nillion", - "nillion-devnet": "yarn workspace @se-2/nillion nillion-devnet" + "nillion-devnet": "yarn workspace @se-2/nillion nillion-devnet", + "nillion-devnet-stop": "yarn workspace @se-2/nillion nillion-devnet-stop" }, "packageManager": "yarn@3.2.3", "devDependencies": { diff --git a/packages/nillion/bootstrap-local-env.sh b/packages/nillion/bootstrap-local-env.sh index 79cf0ec..4c740a0 100755 --- a/packages/nillion/bootstrap-local-env.sh +++ b/packages/nillion/bootstrap-local-env.sh @@ -5,7 +5,6 @@ NILLION_CLI="nillion" NILLION_CLI_COMMAND_USER_KEYGEN="user-key-gen" NILLION_CLI_COMMAND_NODE_KEYGEN="node-key-gen" -echo $NILLION_DEVNET # kill any other nillion-devnet processes pkill -9 -f $NILLION_DEVNET @@ -124,8 +123,11 @@ update_env "NEXT_PUBLIC_NILLION_CHAIN_ID" "$PAYMENTS_CHAIN" $ENV_TO_UPDATE update_env "NEXT_PUBLIC_NILLION_WALLET_PRIVATE_KEY" "$WALLET_PRIVATE_KEY" $ENV_TO_UPDATE update_env "NEXT_PUBLIC_NILLION_BOOTNODE_MULTIADDRESS" "$BOOT_MULTIADDR" $ENV_TO_UPDATE -echo "--------------------" -echo "ℹ️ Updated your $ENV_TO_UPDATE file configurations with variables: websocket, cluster id, keys, blockchain info" -echo "💻 Your Nillion local cluster is still running - process pid: $(pgrep -f $NILLION_DEVNET)" +echo "Running at process pid: $(pgrep -f $NILLION_DEVNET)" + +echo "-------------------------------------------------------" +echo "-----------🦆 CONNECTED TO NILLION-DEVNET 🦆-----------" +echo "-------------------------------------------------------" -exit 0 \ No newline at end of file +echo "ℹ️ Your $ENV_TO_UPDATE file configurations were updated with nillion-devnet connection variables: websocket, cluster id, keys, blockchain info" +echo "💻 The Nillion devnet is still running behind the scenes; to spin down the Nillion devnet at any time, run 'yarn nillion-devnet-stop'" \ No newline at end of file diff --git a/packages/nillion/package.json b/packages/nillion/package.json index 5705404..c568ece 100644 --- a/packages/nillion/package.json +++ b/packages/nillion/package.json @@ -4,6 +4,7 @@ "version": "0.1.0", "scripts": { "nillion": "nillion", - "nillion-devnet": "sh ./bootstrap-local-env.sh" + "nillion-devnet": "sh ./bootstrap-local-env.sh", + "nillion-devnet-stop": "pkill -9 -f nillion-devnet" } }