Represents a Script that can be serialized and deserialized. Scripts contain the Move bytecode payload that can be submitted to the Aptos chain for execution.

Constructors

Methods

Properties

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

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

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

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

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

Methods

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.