Skip to main content

MoveFunction

A function defined in a Move module.

type MoveFunction {
isEntry: Boolean
module: MoveModule!
name: String!
parameters: [OpenMoveType!]
return: [OpenMoveType!]
typeParameters: [MoveFunctionTypeParameter!]
visibility: MoveVisibility
}

Fields

MoveFunction.isEntry ● Boolean scalar

Whether the function is marked entry or not.

MoveFunction.module ● MoveModule! non-null object

The module that this function is defined in.

MoveFunction.name ● String! non-null scalar

The function's unqualified name.

MoveFunction.parameters ● [OpenMoveType!] list object

The function's parameter types. These types can reference type parameters introduced by this function (see typeParameters).

MoveFunction.return ● [OpenMoveType!] list object

The function's return types. There can be multiple because functions in Move can return multiple values. These types can reference type parameters introduced by this function (see typeParameters).

MoveFunction.typeParameters ● [MoveFunctionTypeParameter!] list object

Constraints on the function's formal type parameters.

Move bytecode does not name type parameters, so when they are referenced (e.g. in parameter and return types), they are identified by their index in this list.

MoveFunction.visibility ● MoveVisibility enum

The function's visibility: public, public(friend), or private.

Member Of

MoveCallCommand object ● MoveFunctionConnection object ● MoveFunctionEdge object ● MoveModule object