# 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-beta/classes/polymeshtransactionbase)‹Values›

  ↳ **PolymeshTransactionBatch**

## Index

### Properties

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

### Accessors

* [transactions](#transactions)

### Methods

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

## Properties

### `Optional` blockHash

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

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:47*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L47)

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

***

### `Optional` blockNumber

• **blockNumber**? : *BigNumber*

*Inherited from* [*PolymeshTransaction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction)*.*[*blockNumber*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/polymeshtransaction#optional-blocknumber)

*Defined in* [*src/base/PolymeshTransactionBase.ts:52*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L52)

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

***

### `Protected` context

• **context**: *Context*

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:105*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L105)

***

### `Optional` error

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

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:32*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L32)

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

***

### isCritical

• **isCritical**: *boolean*

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:57*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L57)

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

***

### `Optional` receipt

• **receipt**? : *ISubmittableResult*

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:37*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L37)

stores the transaction receipt (if successful)

***

### status

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

*Inherited from* [*PolymeshTransaction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction)*.*[*status*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/polymeshtransaction#status)

*Defined in* [*src/base/PolymeshTransactionBase.ts:27*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L27)

current status of the transaction

***

### `Optional` txHash

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

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:42*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L42)

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

## Accessors

### transactions

• **get transactions**(): *MapTxData‹Args›*

*Defined in* [*src/base/PolymeshTransactionBatch.ts:71*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBatch.ts#L71)

transactions in the batch with their respective arguments

**Returns:** *MapTxData‹Args›*

## Methods

### getFees

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

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:337*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L337)

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/beta/docs/interfaces/fees.md) *| null›*

***

### getPayingAccount

▸ **getPayingAccount**(): *Promise‹*[*PayingAccount*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/payingaccount.md) *| null›*

*Inherited from* [*PolymeshTransaction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction)*.*[*getPayingAccount*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/polymeshtransaction#getpayingaccount)

*Defined in* [*src/base/PolymeshTransactionBase.ts:295*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L295)

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

A null return value signifies that the caller Account would pay the fees

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

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

***

### onStatusChange

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

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:278*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L278)

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

*Defined in* [*src/base/PolymeshTransactionBase.ts:130*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/base/PolymeshTransactionBase.ts#L130)

Run the transaction and update its status

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

***

### supportsSubsidy

▸ **supportsSubsidy**(): *boolean*

*Overrides* [*PolymeshTransactionBase*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransactionbase)*.*[*supportsSubsidy*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/polymeshtransactionbase#abstract-supportssubsidy)

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

**`note`** batches can't be subsidized

**Returns:** *boolean*
