Class EntryFunction

Hierarchy

  • EntryFunction

Constructors

  • Contains the payload to run a function within a module.

    Example

    A coin transfer function has one type argument "CoinType".

    public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
    

    Example

    A coin transfer function has three arugments "from", "to" and "amount".

    public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
    

    Parameters

    • module_name: ModuleId

      Fully qualified module name. ModuleId consists of account address and module name.

    • function_name: Identifier

      The function to run.

    • ty_args: Seq<TypeTag>

      Type arguments that move function requires.

    • args: Seq<Uint8Array>

      Arugments to the move function.

    Returns EntryFunction

Properties

args: Seq<Uint8Array>

Arugments to the move function.

function_name: Identifier

The function to run.

module_name: ModuleId

Fully qualified module name. ModuleId consists of account address and module name.

ty_args: Seq<TypeTag>

Type arguments that move function requires.

Methods

  • Example

    A coin transfer function has one type argument "CoinType".

    public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
    

    Example

    A coin transfer function has three arugments "from", "to" and "amount".

    public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
    

    Returns

    Parameters

    • module: string

      Fully qualified module name in format "AccountAddress::module_name" e.g. "0x1::coin"

    • func: string

      Function name

    • ty_args: Seq<TypeTag>

      Type arguments that move function requires.

    • args: Seq<Uint8Array>

      Arugments to the move function.

    Returns EntryFunction

Generated using TypeDoc