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
{{ message }}
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
In general, an entry function must satisfy the following properties:
Has the entry modifier. The visibility does not matter. The function can be public, public(friend), or internal.
Has no return value
(Optional) Has a mutable reference to an instance of the TxContext struct defined in the [TxContext module](https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/packages/sui-framework/sources/tx_context.move) as the last parameter.
More concretely, the transfer function is public, has no return value, and has three parameters:
c - Represents a gas object whose ownership is to be transferred.
recipient - The [address](https://github.com/move-language/move/blob/main/language/documentation/book/src/address.md) of the intended recipient
_ctx - A mutable reference to an instance of the TxContext struct (in this particular case, this parameter is not actually used in the function's body as indicated by its name starting with _). Because it is unused, the parameter could be removed. The mutable reference to the TxContext is optional for entry functions.
We probably will have something similar and we should be able to check it at compile time.
The text was updated successfully, but these errors were encountered:
As per sui doc:
https://docs.sui.io/build/move#entry-functions
We probably will have something similar and we should be able to check it at compile time.
The text was updated successfully, but these errors were encountered: