Difference between revisions of "How-To: Create an NNS motion proposal"

From Internet Computer Wiki
Jump to: navigation, search
(Replaced content with "Please see [https://35k4u-jqaaa-aaaam-abrma-cai.icp0.io/docs/current/developer-docs/daos/nns/concepts/proposals/proposal-submit How to create NNS proposal on ICP developer...")
Tag: Replaced
 
(72 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This article explains one way to submit NNS motion proposals.
+
Please see [https://35k4u-jqaaa-aaaam-abrma-cai.icp0.io/docs/current/developer-docs/daos/nns/concepts/proposals/proposal-submit How to create NNS proposal on ICP developer docs]
 
 
==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 dfx===
 
 
 
1. Navigate to [https://smartcontracts.org/ | smartcontracts.org]
 
2. Install `dfx` via
 
 
 
<pre>
 
$ sh -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"
 
</pre>
 
 
 
===Create a neuron===
 
 
 
====1. Create a private/public keypair====
 
 
 
1.1 Install <code>keysmith</code>
 
 
 
1.2 Create <code>seed phrase</code>:
 
 
 
<pre>
 
$ keysmith generate -o seed.txt
 
</pre>
 
 
 
1.3 Create <code>private.pem</code>
 
 
 
<pre>
 
$ keysmith <private-key -o <private.pem
 
</pre>
 
 
 
1.4 Derive Ledger <code>account</code> from private key:
 
 
 
<pre>
 
$ keysmith account -i 0
 
</pre>
 
 
 
====2. Link this private/public keypair to <code>dfx</code> 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"
 
 
 
<pre>
 
$ dfx identity import proposals private.pem
 
</pre>
 
 
 
* 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 <code>account</code> 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====
 
 
 
==How to send a proposal==
 
 
 
===Craft a proposal in markdown===
 
 
 
===Send proposal via dfx===
 
 
 
===Check dashboard to see proposal was successful===
 

Latest revision as of 15:07, 2 September 2024