Class TransactionBuilderABI

Builds raw transactions based on ABI

Hierarchy

  • TransactionBuilderABI

Constructors

Properties

abiMap: Map<string, ScriptABI>
builderConfig: Partial<ABIBuilderConfig>

Methods

  • Builds a RawTransaction

    Example

    Below are valid value examples

    // Structs are in format `AccountAddress::ModuleName::StructName`
    0x1::aptos_coin::AptosCoin
    // Vectors are in format `vector<other_tag_string>`
    vector<0x1::aptos_coin::AptosCoin>
    bool
    u8
    u16
    u32
    u64
    u128
    u256
    address

    Returns

    RawTransaction

    Parameters

    • func: string

      Fully qualified func names, e.g. 0x1::Coin::transfer

    • ty_tags: string[]

      TypeTag strings.

    • args: any[]

      Function arguments

    Returns RawTransaction

  • Builds a TransactionPayload. For dApps, chain ID and account sequence numbers are only known to the wallet. Instead of building a RawTransaction (requires chainID and sequenceNumber), dApps can build a TransactionPayload and pass the payload to the wallet for signing and sending.

    Returns

    TransactionPayload

    Parameters

    • func: string

      Fully qualified func names, e.g. 0x1::Coin::transfer

    • ty_tags: string[]

      TypeTag strings

    • args: any[]

      Function arguments

    Returns TxnBuilderTypes.TransactionPayload

Generated using TypeDoc