Skip to content

EntryFunction

MarcoDotIO edited this page Apr 25, 2023 · 1 revision

EntryFunction

Aptos Blockchain Entry Function

public struct EntryFunction: TransactionProtocol, Equatable 

Inheritance

Equatable, TransactionProtocol

Properties

module

The module's ID

public var module: ModuleId

function

The function's name

public var function: String

tyArgs

The type tag arguments

public var tyArgs: [TypeTag]

args

The arguments themselves

public var args: [Data]

Methods

natural(_:_:_:_:)

Create an EntryFunction instance using the given natural parameters.

public static func natural(
        _ module: String,
        _ function: String,
        _ tyArgs: [TypeTag],
        _ args: [AnyTransactionArgument]
    ) throws -> EntryFunction 

This function creates an EntryFunction instance using the given natural parameters and returns the resulting instance.

Parameters

  • module: A string representation of the ModuleId of the entry function.
  • function: A string representation of the name of the entry function.
  • tyArgs: An array of TypeTag objects representing the type arguments of the entry function.
  • args: An array of AnyTransactionArgument objects representing the arguments of the entry function.

Throws

An error of type AptosError indicating that the ModuleId instance cannot be created from the given string representation or that an argument cannot be encoded.

Returns

An EntryFunction instance created using the given natural parameters.

deserialize(from:)

public static func deserialize(from deserializer: Deserializer) throws -> EntryFunction 

serialize(_:)

public func serialize(_ serializer: Serializer) throws 
Types
Protocols
Global Variables
Global Functions
Extensions
Clone this wiki locally