Sns-testing add_hot_key error

So after running the sns-testing repo I have OpenFPL setup in the local NNS. I would now like to use dfx to assign the local default developer as a hotkey to one of the neurons as a way to be able to raise a proposal (something I do live with my current neuron id).

So I see in the sns testing-repo there is a file called add_hot_key.sh, just wondering the format of the command:

For example when running the sns I get example users:

Since the script failed for you (you might need to run it within docker) and you seem to only need to set up a single hot key, it might make the most sense to use quill directly:

quill sns \
  --canister-ids-file ./sns_canister_ids.json \
  --pem-file "${PEM_FILE}" \
  neuron-permission \
  --principal "${HOTKEY_PRINCIPAL}" \
  --permissions vote,submit-proposal,manage-voting-permission \
  add \
  "${DEVELOPER_NEURON_ID}" \
  > msg.json
quill --insecure-local-dev-mode send --yes msg.json

where you just need to fill in the path to the PEM file, the principal for which you want to register a hotkey and your developer neuron id.

Ok I am happy to do it any way I can get it working. I’m not sure where the path for the created pem files is after running @Andre-Popovitch code…

So after running the sns-testing repo steps I end up with a folder of identities:

Assuming one of these.

Indeed, the PEM file is located in the corresponding folder for the respective identity.

So when I run it I get the following error:

I forgot to tell you that you might need to set export IC_URL=http://localhost:8080 for local development.

1 Like

Note that you can mint SNS tokens with this command:

SNS_GOVERNANCE_CANISTER_ID="..." # can be found in sns_canister_ids.json
PRINCIPAL="..." # example: jg6qm-uw64t-m6ppo-oluwn-ogr5j-dc5pm-lgy2p-eh6px-hebcd-5v73i-nqe
NETWORK="local"
dfx canister call "${SNS_GOVERNANCE_CANISTER_ID}" mint_tokens '(record{recipient=record{owner=principal"${PRINCIPAL}"};amount_e8s=100_000_000_000:nat64})' --network "$NETWORK" 

Once you have SNS tokens, you should be able to stake an SNS neuron with quill sns stake-neuron or potentially through the NNS Dapp UI (if you send the tokens to a principal controlled by the NNS Dapp)

1 Like

I get this error when trying to mint local FPL

Sorry @jamesbeadle , try this:

SNS_GOVERNANCE_CANISTER_ID="..."
PRINCIPAL="..."
NETWORK="local"
dfx canister call "${SNS_GOVERNANCE_CANISTER_ID}" mint_tokens "(record{recipient=opt record{owner=opt principal \"${PRINCIPAL}\"};amount_e8s=opt 100_000_000_000:opt nat64})" --network "$NETWORK" 

Trying to mint from the index canister… Is that correct?

mint_tokens is an endpoint on (the test version of) SNS governance, not index, so try using the SNS governance canister ID instead

1 Like

My copy and paste error sorry, I have tokens!

Ok so I still can’t raise my first proposal, I used that FPL to create a neuron.

I then ran the first proposal I ran live but I get Certificate verification failed?

With quill, you need to pass --insecure-local-dev-mode when testing locally.

So if I add that with quill I get the same error when submitting the proposal:

The argument --insecure-local-dev-mode should be passed to quill send instead: I’m not sorry for not being explicit about that.

Ok onto the next error…

So now it’s telling me the governance canister has no update method manage_neuron

Then you likely used a canister ID for the call that is not the governance canister.

1 Like

Yeah my bad, had the wrong id, sorry