# PolymeshTransactionBatch

Wrapper class for a batch of Polymesh Transactions

## Type parameters

▪ **Args**: *unknown\[]*

▪ **Values**: *unknown\[]*

## Hierarchy

* [PolymeshTransactionBase](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)‹Args, Values›

  ↳ **PolymeshTransactionBatch**

## Index

### Properties

* [blockHash](#optional-blockhash)
* [context](#protected-context)
* [error](#optional-error)
* [isCritical](#iscritical)
* [receipt](#optional-receipt)
* [status](#status)
* [tag](#tag)
* [txHash](#optional-txhash)

### Accessors

* [args](#args)

### Methods

* [getFees](#getfees)
* [getPayingAccount](#getpayingaccount)
* [onStatusChange](#onstatuschange)
* [run](#run)

## Properties

### `Optional` blockHash

• **blockHash**? : *undefined | string*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*blockHash*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#optional-blockhash)

*Defined in* [*src/base/PolymeshTransactionBase.ts:50*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L50)

hash of the block where this transaction resides (status: `Succeeded`, `Failed`)

***

### `Protected` context

• **context**: [*Context*](/polymesh-sdk-api-reference/v12.0.2/classes/context.md)

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*context*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#protected-context)

*Defined in* [*src/base/PolymeshTransactionBase.ts:113*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L113)

***

### `Optional` error

• **error**? : [*PolymeshError*](/polymesh-sdk-api-reference/v12.0.2/classes/polymesherror.md)

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*error*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#optional-error)

*Defined in* [*src/base/PolymeshTransactionBase.ts:35*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L35)

stores errors thrown while running the transaction (status: `Failed`, `Aborted`)

***

### isCritical

• **isCritical**: *boolean*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*isCritical*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#iscritical)

*Defined in* [*src/base/PolymeshTransactionBase.ts:55*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L55)

whether this transaction failing makes the entire transaction queue fail or not

***

### `Optional` receipt

• **receipt**? : *ISubmittableResult*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*receipt*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#optional-receipt)

*Defined in* [*src/base/PolymeshTransactionBase.ts:40*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L40)

stores the transaction receipt (if successful)

***

### status

• **status**: [*TransactionStatus*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v12/docs/enums/transactionstatus.md) = TransactionStatus.Idle

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*status*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#status)

*Defined in* [*src/base/PolymeshTransactionBase.ts:30*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L30)

current status of the transaction

***

### tag

• **tag**: *TxTag*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*tag*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#tag)

*Defined in* [*src/base/PolymeshTransactionBase.ts:60*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L60)

type of transaction represented by this instance (mostly for display purposes)

***

### `Optional` txHash

• **txHash**? : *undefined | string*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*txHash*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#optional-txhash)

*Defined in* [*src/base/PolymeshTransactionBase.ts:45*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L45)

transaction hash (status: `Running`, `Succeeded`, `Failed`)

## Accessors

### args

• **get args**(): *Args\[]*

*Defined in* [*src/base/PolymeshTransactionBatch.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBatch.ts#L48)

Arguments for each transaction in the batch

**Returns:** *Args\[]*

## Methods

### getFees

▸ **getFees**(): *Promise‹*[*Fees*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v12/docs/interfaces/fees.md) *| null›*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*getFees*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#getfees)

*Defined in* [*src/base/PolymeshTransactionBase.ts:306*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L306)

Get all (protocol and gas) fees associated with this transaction. Returns null if the transaction is not ready yet (this can happen if it depends on the execution of a previous transaction in the queue)

**`note`** this value might change if the transaction is run at a later time. This can be due to a governance vote

**Returns:** *Promise‹*[*Fees*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v12/docs/interfaces/fees.md) *| null›*

***

### getPayingAccount

▸ **getPayingAccount**(): *Promise‹object | null›*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*getPayingAccount*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#getpayingaccount)

*Defined in* [*src/base/PolymeshTransactionBase.ts:269*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L269)

Retrieve the Account that would pay for the transaction fees if it was run at this moment, as well as the maximum amount that can be charged to it. A null allowance means that there is no limit to that amount

A null return value signifies that the current Account will pay for the fees

**`note`** this value might change if, before running the transaction, the current Account enters (or leaves) a subsidizer relationship

**Returns:** *Promise‹object | null›*

***

### onStatusChange

▸ **onStatusChange**(`listener`: function): *function*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*onStatusChange*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#onstatuschange)

*Defined in* [*src/base/PolymeshTransactionBase.ts:252*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L252)

Subscribe to status changes

**Parameters:**

▪ **listener**: *function*

callback function that will be called whenever the status changes

▸ (`transaction`: this): *void*

**Parameters:**

| Name          | Type |
| ------------- | ---- |
| `transaction` | this |

**Returns:** *function*

unsubscribe function

▸ (): *void*

***

### run

▸ **run**(): *Promise‹void›*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md)*.*[*run*](/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbase.md#run)

*Defined in* [*src/base/PolymeshTransactionBase.ts:139*](https://github.com/PolymathNetwork/polymesh-sdk/blob/44d12f59/src/base/PolymeshTransactionBase.ts#L139)

Run the transaction and update its status

**Returns:** *Promise‹void›*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.polymath.network/polymesh-sdk-api-reference/v12.0.2/classes/polymeshtransactionbatch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
