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
Sometimes in smart contract we want to extract some part of the code to be reusable for multiple blocks or to structure more your code.
Since the AEIP17, we introduced a way to use function and to expose some through JSON rpc.
Describe the solution you'd like
To support this feature, we should adapt the interpreter parser to support function capability.
Private function
We have to support this new syntax
funmyFundo# Do somethingend
Function can have 0 or N arity
They can only be called with the smart contract actions or condition blocks
Pubilc function (exported)
We have to support this new syntax
exportfunmyFundo# Do something and return publicallyend
Function can have 0 or N arity
They can be called by both private functions, actions or conditions blocks
Their scope should be limited: the parser should prevent :
to mutate state
use I/O functions
contain loops to a certain amount of iterations or complexity
A default allowed complexity has to be defined to be consumed on each instruction (aka gas) limiting the execution of the external functions.
Additional context
No response
Epic
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Sometimes in smart contract we want to extract some part of the code to be reusable for multiple blocks or to structure more your code.
Since the AEIP17, we introduced a way to use function and to expose some through JSON rpc.
Describe the solution you'd like
To support this feature, we should adapt the interpreter parser to support function capability.
We have to support this new syntax
Function can have 0 or N arity
They can only be called with the smart contract actions or condition blocks
We have to support this new syntax
Function can have 0 or N arity
They can be called by both private functions, actions or conditions blocks
Their scope should be limited: the parser should prevent :
A default allowed complexity has to be defined to be consumed on each instruction (aka gas) limiting the execution of the external functions.
Additional context
No response
Epic
No response
The text was updated successfully, but these errors were encountered: