Skip to content

Commit

Permalink
Updating formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 5, 2025
1 parent 16ceaf2 commit 03b16d7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions bin/dfx-sns-demo
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ sleep 1

if false; then

curl 'http://localhost:8080/_/topology' >topology.json
SNS_SUBNET_ID="$(jq -r '.subnet_configs | to_entries[] | select(.value.subnet_kind == "SNS") | .key' topology.json)"
NEURON_ARGS=(--proposer "$(dfx-neuron-id --network "$DFX_NETWORK" --identity snsdemo8)")
PEM_ARGS=("--secret-key-pem" "$(dfx-identity-pem --identity snsdemo8)")

SUBNET_REMOVE_ARGS=($(dfx canister call nns-sns-wasm get_sns_subnet_ids '(record{})' | idl2json | jq -r '.sns_subnet_ids | map("--sns-subnet-ids-to-remove " + . + " ") | .[]'))

NNS_URL="$(dfx-network-provider --network "$DFX_NETWORK")"

"ic-admin" \
--nns-url "$NNS_URL" \
"${PEM_ARGS[@]}" \
propose-to-update-sns-subnet-ids-in-sns-wasm \
--summary "Deploy SNSes to SNS subnet" \
"${NEURON_ARGS[@]}" \
--sns-subnet-ids-to-add "$SNS_SUBNET_ID" \
"${SUBNET_REMOVE_ARGS[@]}"
curl 'http://localhost:8080/_/topology' >topology.json
SNS_SUBNET_ID="$(jq -r '.subnet_configs | to_entries[] | select(.value.subnet_kind == "SNS") | .key' topology.json)"
NEURON_ARGS=(--proposer "$(dfx-neuron-id --network "$DFX_NETWORK" --identity snsdemo8)")
PEM_ARGS=("--secret-key-pem" "$(dfx-identity-pem --identity snsdemo8)")

SUBNET_REMOVE_ARGS=($(dfx canister call nns-sns-wasm get_sns_subnet_ids '(record{})' | idl2json | jq -r '.sns_subnet_ids | map("--sns-subnet-ids-to-remove " + . + " ") | .[]'))

NNS_URL="$(dfx-network-provider --network "$DFX_NETWORK")"

"ic-admin" \
--nns-url "$NNS_URL" \
"${PEM_ARGS[@]}" \
propose-to-update-sns-subnet-ids-in-sns-wasm \
--summary "Deploy SNSes to SNS subnet" \
"${NEURON_ARGS[@]}" \
--sns-subnet-ids-to-add "$SNS_SUBNET_ID" \
"${SUBNET_REMOVE_ARGS[@]}"

fi

Expand Down

0 comments on commit 03b16d7

Please sign in to comment.