-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathlist_sns_dev_neurons.sh
executable file
·31 lines (24 loc) · 1.08 KB
/
list_sns_dev_neurons.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
. ./constants.sh normal
export CURRENT_DX_IDENT=$(dfx identity whoami)
for DEV_IDENT in "${HOME}"/.config/dfx/identity/dev-ident-*; do
PEM_FILE="$(readlink -f "${DEV_IDENT}/identity.pem")"
dfx identity use "${DEV_IDENT}"
export DX_PRINCIPAL="$(dfx identity get-principal)"
export NEURON_IDS="$(dfx canister \
--network "${NETWORK}" \
call "${SNS_GOVERNANCE_CANISTER_ID}" list_neurons \
"(record {of_principal = opt principal\"${DX_PRINCIPAL}\"; limit = 0})")"
echo "Listing Developer Neurons for Identity ${DEV_IDENT}, Principal ${DX_PRINCIPAL}"
echo "${NEURON_IDS}"
done
# List the canister controlled SNS Dev Neurons for the OC SNS deployment config
CANISTER_DEV_NEURON=n2xex-iyaaa-aaaar-qaaeq-cai
echo "Listing for ${CANISTER_DEV_NEURON}"
dfx canister \
--network "${NETWORK}" \
call "${SNS_GOVERNANCE_CANISTER_ID}" \ list_neurons "(record {of_principal = opt principal\"${CANISTER_DEV_NEURON}\"; limit = 0})"
# Switch back to the previous identity
dfx identity use "${CURRENT_DX_IDENT}"