Similar to adding contracts, click on the add function button on the top right hand side, Select one of the contracts you previously added, and then select a function from pre-populated list of functions we got from your ABI, which are valid for user signatures and then if you choose to enable access control for these function, provide the values for which you would like your users to sign. Here, the types can be address, string, uint or bytes. Keep in mind that for uint, we allow you to input a mix max range, so as long as the value you are putting in matches the range during the function call, the user operation will be carried out successfully. if the value put in is out of range, the SDK will throw an error back to you
After you've selected the function you want to add, SolaceConnect Dashboard will auto-generate a description for this function. This description will be used to describe the operations that your users are granting permission for when they interact with your application.
While the auto-generated description is designed to accurately represent the function's purpose, you have the option to edit it if you wish. This can be helpful if you want to provide more context or use specific terminology that your users might be familiar with.
However, please note that any modifications to the auto-generated description will be evaluated using our AI model (GPT) for appropriateness and accuracy. This is to ensure that the descriptions remain clear, accurate, and user-friendly.
This feature aims to streamline the process of adding new functions and ensures that users are always informed about the permissions they are granting. It also saves you the trouble of coming up with descriptions yourself while ensuring consistency and clarity across all function descriptions.
The naming of your contract functions plays a crucial role in auto-generating clear and accurate descriptions. When you are developing your smart contracts, we strongly advise using names that clearly represent what each function does. Not only does this improve the readability of your code, but it also makes the functions' purposes more understandable for the end-users interacting with your application through SolaceConnect.
In the context of SolaceConnect, well-named functions translate into better auto-generated descriptions. These descriptions are pivotal in providing users with a clear understanding of the permissions they are granting. Consequently, users are more likely to feel comfortable interacting with your application when they can easily understand what each function does.
By following good naming practices, you can improve the user experience, enhance the clarity of function permissions, and ultimately increase the trustworthiness of your application.