I have a hard time understanding how SNS GenericNervousSystemFunctions work while reading the documentation provided on the portal.
If I understand correctly, I would first need to submit a new proposal to a SNS Governance canister to register a particular new type of proposal. For this purpose, AddGenericNervousSystemFunction should be used, which I assume is proposed through calling manage_neuron on the SNS canister.
I also understand that adding such a new type of proposal defines which canister and exposed function would be called if this new type of proposal were used.
So for example if I would like to make the method fn hello_world() of a canister ID 123456789 available for a DAO, I would have first to submit an AddGenericNervousSystemFunction proposal that points to this canister and function.
However, this is where I begin to get lost. How could I effectively submit a proposal of that kind afterwards? The documentation references ExecuteNervousSystemFunction, but I find absolutely no reference to this in any Candid files. I am guessing it happens through manage_neuron as well but, really confuse about what payload should then used.
Additionally, Iām a bit confused about what interfaces could be used in the functions that are called through proposals. Can the methods be query, or should they only be update? Should they return a Result<(), String>, or is the only way to communicate that a function fails by trapping?
Is there perhaps more documentation or a design flow about the subject available?
Gosh, there are typos in the documentation. Bravo.
In the documentation I was reading, ExecuteNervousSystemFunction is mentioned multiple times, but the correct term is actually ExecuteGenericNervousSystemFunction.
Once I figured this out, I found the related documentation, which is also not linked on the page I was readingā¦
Thanks for bringing attention to this typo and the feedback regarding the clarity of these docs. Iāve opened a PR to fix that typo, and Iāll reach out to the SNS/NNS team to let them know these docs could use some revisions.
Can you share where you asked these questions? Wanted to see whether we can help, but when clicking on āhereā, I only get referred to the message where you shared this. Perhaps this is an incorrect link?