Skip to main content
Functions are the executable components of Move modules. Understanding function types and patterns is crucial for effective Move development.

Function Basics

Visibility Modifiers

Private

Default visibility, only within module

Public

Callable from any module

Public(package)

Only within the same package

Entry

Callable from transactions

Entry Functions

Entry functions can be called directly from transactions:
Entry functions cannot return types without drop ability. They also have restrictions when used in Programmable Transaction Blocks.

Parameters

By Value, Reference, and Mutable Reference

Transaction Context

Return Values

Generics

Inline Functions

Best Practices

Move Overview

Learn Move basics

Move Modules

Module organization

Move Abilities

Type abilities