# PolymeshTransactionBatch

Wrapper class for a batch of Polymesh Transactions

## Type parameters

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

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

## Hierarchy

* [PolymeshTransactionBase](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)‹Args, Values›

  ↳ **PolymeshTransactionBatch**

## Index

### Properties

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

### Accessors

* [args](#args)
* [tag](#tag)

### Methods

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

## Properties

### `Optional` blockHash

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

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*blockHash*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#optional-blockhash)

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

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

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/context)

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#protected-context)

*Defined in* [*src/base/PolymeshTransactionBase.ts:119*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L119)

### `Optional` error

• **error**? : [*PolymeshError*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymesherror)

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*error*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#optional-error)

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

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

### isCritical

• **isCritical**: *boolean*

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*isCritical*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#iscritical)

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

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

### paidByThirdParty

• **paidByThirdParty**: *boolean*

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*paidByThirdParty*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#paidbythirdparty)

*Defined in* [*src/base/PolymeshTransactionBase.ts:66*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L66)

whether the fees for this tx are paid by a third party. For example, when accepting/rejecting a request to join an Identity, fees are paid by the Identity that sent the request

### `Optional` receipt

• **receipt**? : *ISubmittableResult*

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*receipt*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#optional-receipt)

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

stores the transaction receipt (if successful)

### status

• **status**: [*TransactionStatus*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/enums/transactionstatus) = TransactionStatus.Idle

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*status*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#status)

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

current status of the transaction

### `Optional` txHash

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

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*txHash*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#optional-txhash)

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

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/7362b318/src/base/PolymeshTransactionBatch.ts#L48)

Arguments for each transaction in the batch

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

### tag

• **get tag**(): *TxTag*

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*tag*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#tag)

*Defined in* [*src/base/PolymeshTransactionBase.ts:314*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L314)

type of transaction represented by this instance for display purposes. If the transaction isn't defined at design time, the tag won't be set (will be empty string) until the transaction is about to be run

**Returns:** *TxTag*

## Methods

### getFees

▸ **getFees**(): *Promise‹*[*Fees*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/fees) *| null›*

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*getFees*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#getfees)

*Defined in* [*src/base/PolymeshTransactionBase.ts:281*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L281)

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)

**Returns:** *Promise‹*[*Fees*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/fees) *| null›*

### onStatusChange

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

*Inherited from* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*onStatusChange*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#onstatuschange)

*Defined in* [*src/base/PolymeshTransactionBase.ts:268*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L268)

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*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/polymeshtransactionbase)*.*[*run*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/polymeshtransactionbase#run)

*Defined in* [*src/base/PolymeshTransactionBase.ts:153*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/base/PolymeshTransactionBase.ts#L153)

Run the poly transaction and update the transaction status

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