neo-one icon indicating copy to clipboard operation
neo-one copied to clipboard

Finalize `@safe` decorator in compiler

Open spencercorwin opened this issue 3 years ago • 0 comments

If a method is marked as safe can it call runtime.notify? If not then we may not be able to mark ANY method as safe, since any method could potentially call notify, like when throwing an error.

Could keep the safe decorator but mention this caveat in the docs.

A method will be marked safe in the manifest if it is:

  • constant (?)
  • a getter method (?)
  • a readonly property
  • marked with @safe

When this is done remove these types from Client:

  • InvokeSendUnsafeTransactionOptions
  • InvokeReceiveTransactionOptions
  • InvokeSendUnsafeReceiveTransactionOptions

spencercorwin avatar Jun 17 '21 05:06 spencercorwin