You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since entry point functions cannot contain references, the following method will fail.
Discussion
One solution is to have a way to specify some methods as non-entry point methods. There would be two ways to define a non-entry point function, since if you pull in a Noir library, its method will be seen as non-entrypoint. There are other considerations here related to whether a function should by default be an entry point.
Another solution is to say that all methods in a contract are entry point functions and if you want a non-entry point function, you need to define it outside of the contract scope.
The text was updated successfully, but these errors were encountered:
Another solution is to say that all methods in a contract are entry point functions and if you want a non-entry point function, you need to define it outside of the contract scope.
This is the current was the previous design. If you want the code above to work you can lift PlaceholderStruct and utility_method out of the contract declaration. Therefore, "if it's not in the contract, it's not in the contract."
I think adding a required annotation like #[contract_library_method] just makes this interaction more complex than needed.
This is a retroactive issue.
Problem
Consider the following method:
Since entry point functions cannot contain references, the following method will fail.
Discussion
One solution is to have a way to specify some methods as non-entry point methods. There would be two ways to define a non-entry point function, since if you pull in a Noir library, its method will be seen as non-entrypoint. There are other considerations here related to whether a function should by default be an entry point.
Another solution is to say that all methods in a contract are entry point functions and if you want a non-entry point function, you need to define it outside of the contract scope.
The text was updated successfully, but these errors were encountered: