Representation of a Script that can serialized and deserialized

Constructors

Properties

Methods

Constructors

  • Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.

    Parameters

    • bytecode: Uint8Array

      The move module bytecode

    • type_args: TypeTag[]

      The type arguments that the bytecode function requires.

    • args: ScriptFunctionArgument[]

      The arguments that the bytecode function requires.

    Returns Script

    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 arguments "from", "to" and "amount".

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

Properties

The arguments that the bytecode function requires.

bytecode: Uint8Array

The move module bytecode

type_args: TypeTag[]

The type arguments that the bytecode function requires.

Methods

Generated using TypeDoc