SNS GenericNervousSystemFunctions

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ā€¦

The correct link is: https://internetcomputer.org/docs/current/developer-docs/daos/sns/managing/making-proposals/#executegenericnervoussystemfunction

Moreover, once I got the correct spelling, I was able to find the references in the Candid files.

Iā€™ll open a separate question for what is still unclear (here).

1 Like

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.

1 Like

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?

Copy/paste error in the above link, my bad sorry, but, no worries, @levi has answered the question.

1 Like