1082
September 20, 2021, 6:01am
1
Can we use commands to manage neurons?
I want to do the following from command line:
Stake a new neuron
Set its dissolve delay (in a high-precision fashion, rather than using mouse cursor)
Merge maturity (with option to choose 0-100%)
Query neuron’s maturity yield
Can’t find any command to achieve these goals from dfx canister
or dfx ledger
.
Ori
September 20, 2021, 7:10pm
2
You can, you do this by calling the NNS governance canister using dfx. For an airgapped setup you’d sign a message instead of calling directly, eg:
dfx canister --network=https://ic0.app --no-wallet sign rrkah-fqaaa-aaaaa-aaaaq-cai get_full_neuron '(<your_neuron_id> : nat64 )'
See this guide for more on this:
https://ic.associates/nns-command-line-guide/
You can also use the quill tool, which has built in commands for tasks like this:
https://github.com/dfinity/quill
Nuno
September 22, 2021, 6:45pm
3
Yes, would like to know how to merge maturity as well, ic.associates is cool but no command to merge maturity. is there a command to merge maturity on the command line?
Nuno
September 22, 2021, 8:19pm
4
I found it to Merge the Maturity, if it helps anyone:
dfx canister --network=https://ic0.app --no-wallet call \
rrkah-fqaaa-aaaaa-aaaaq-cai manage_neuron \
'(
record {
id = opt record {id ='neuron--id-goes-here' : nat64};
command = opt variant {
MergeMaturity = record {
percentage_to_merge = 100 : nat32;
}
}
}
)'
2 Likes