@aptos-labs/ts-sdk - v3.1.1
    Preparing search index...

    Class Script

    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.

    Index

    Implementation - Transactions

    Methods

    Implementation - Transactions

    • 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)
      

    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