Difference between revisions of "How-To: Create an NNS motion proposal"
Diego.prats (talk | contribs) |
Diego.prats (talk | contribs) |
||
Line 15: | Line 15: | ||
==One-time setup== | ==One-time setup== | ||
− | ===Install | + | ===Install Tools=== |
− | 1. | + | 1. Install '''dfx''' |
− | + | ||
+ | * '''dfx''' is the canister SDK and it will be used to send messages from your machine to NNS | ||
+ | * [https://smartcontracts.org/ | smartcontracts.org] | ||
+ | |||
+ | 3. Install '''keysmith''' | ||
+ | |||
+ | * '''keysmith''' will be used to generate a privat/public key pair for the IC | ||
+ | * https://github.com/dfinity/keysmith | ||
+ | |||
+ | |||
+ | 4. Install '''quill''' | ||
+ | |||
+ | * '''quill''' is a minimalist wrapper for crafting & sending messages to run one's neuron | ||
+ | * https://github.com/dfinity/quill | ||
+ | |||
+ | Note: this article will assume that you execute '''quill''' on your local machine by running | ||
<pre> | <pre> | ||
− | $ | + | /quill $ target/release/quill [OPTIONS] <SUBCOMMAND> |
</pre> | </pre> | ||
Revision as of 22:37, 31 January 2022
This article explains one way to submit NNS motion proposals.
Background
To properly follow what is going on, there are a few high-level points worth highlighting:
Only Neurons can submit NNS proposals
Neurons with at least 1 ICP and 6 months of dissolve delay can submit NNS proposals. So the first step is to create such a neuron.
The NNS Governance Canister accepts motion proposals
The Governance Canister is just a canister like any other, so it has a Candid file, it accepts messages, etc... This article describes a way where you can have your local computer send a message to the governance canister (signed on behalf of a neuron) that contains a motion proposal.
One-time setup
Install Tools
1. Install dfx
- dfx is the canister SDK and it will be used to send messages from your machine to NNS
- | smartcontracts.org
3. Install keysmith
- keysmith will be used to generate a privat/public key pair for the IC
- https://github.com/dfinity/keysmith
4. Install quill
- quill is a minimalist wrapper for crafting & sending messages to run one's neuron
- https://github.com/dfinity/quill
Note: this article will assume that you execute quill on your local machine by running
/quill $ target/release/quill [OPTIONS] <SUBCOMMAND>
Create a neuron
1. Create a private/public keypair
1.1 Install keysmith
1.2 Create seed phrase
:
$ keysmith generate -o seed.txt
1.3 Create private.pem
$ keysmith <private-key -o <private.pem
1.4 Derive Ledger account
from private key:
$ keysmith account -i 0
2. Link this private/public keypair to dfx
so you can use it as an "Identity"
2. 1nstall that key into dfx and create an identity
In this case, the new identity is called "proposals"
$ dfx identity import proposals private.pem
- If you see “creating identity: proposals” in the terminal, this means it worked*
- further reading on dfx identities: dfx identity :: Internet Computer 2
3. Send 1.0001 ICP to the "account ID" represented by the public/private keypair (now called the "identity")
3.1 Send 1.0001 ICP to the account
from 1.4
4. Now that the account has the required ICP, spawn a neuron
Note: This section assumes you have Quill installed
4.1 Craft and send a message to spawn a neuron from the account
$ target/release/quill --pem-file private.pem neuron-stake --name $NAME --amount $AMOUNT > message.json
$ target/release/quill send message.json
- You should see a message with a neuron ID spawned
5. Increase neuron dissolve to at least 6 months
- Time is measured in milliseconds in the NNS
- One year: 31557600 milliseconds
5.1 Craft message to send the neuron
quill --pem-file private.pem neuron-manage 148885932052941245 --additional-dissolve-delay-seconds 31557600 > message.json
5.2 Send jusr-created message to the Governance Canister
$ target/release/quill send message.json