# SNS GenericNervousSystemFunctions

**URL:** <https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257>\
**Category:** Developers\
**Created:** [June 21, 2024, 2:44pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257 "2024-06-21T14:44:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [June 21, 2024, 2:44pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/1 "2024-06-21T14:44:06Z")

</div>

I have a hard time understanding how SNS `GenericNervousSystemFunctions` work while reading the documentation provided on the [portal](https://internetcomputer.org/docs/current/developer-docs/daos/sns/managing/sns-asset-canister/#sns-genericnervoussystemfunctions).

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?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [June 21, 2024, 2:49pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/2 "2024-06-21T14:49:00Z")

</div>

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](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](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/2)).

---

<div class="post-metadata">

**Author:** ![Jessie](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jessie/32/11227_2.png) [@Jessie](https://forum.dfinity.org/u/Jessie)\
**Post date:** [June 24, 2024, 2:06pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/3 "2024-06-24T14:06:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lara](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@lara](https://forum.dfinity.org/u/lara)\
**Post date:** [June 24, 2024, 2:59pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/4 "2024-06-24T14:59:14Z")

</div>

> [@peterparker](#):
>
> I’ll open a separate question for what is still unclear ([here](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/2)).

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?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [June 24, 2024, 3:06pm UTC](https://forum.dfinity.org/t/sns-genericnervoussystemfunctions/32257/5 "2024-06-24T15:06:37Z")

</div>

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

> [@SNS Generic Function Interfaces](https://forum.dfinity.org/t/sns-generic-function-interfaces/32259/2):
>
> The methods can be either one, because they are called through the sns-governance-canister so it will be an inter-canister-call which can be either update or query. However as of now the sns-governance-canister does not save the response into the proposal. As of now the generic function can return anything as long as it replies with something, it is considered a success, even if it replies with Err(String). [This comment](https://github.com/dfinity/ic/blob/1b4573ab65bd7b3786522140b6adb75bb4a3799f/rs/sns/governance/src/canister_control.rs#L310) in the sns-governance-canister-code says more. It looks like there was a…
