# PolymeshTransaction

Wrapper class for a Polymesh Transaction

## Type parameters

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

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

## Hierarchy

* [PolymeshTransactionBase](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransactionbase.md)‹Values›

  ↳ **PolymeshTransaction**

## Index

### Properties

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

### Accessors

* [args](#args)

### Methods

* [composeTx](#protected-composetx)
* [getFees](#getfees)
* [getPayingAccount](#getpayingaccount)
* [getProtocolFees](#protected-getprotocolfees)
* [ignoresSubsidy](#protected-ignoressubsidy)
* [onStatusChange](#onstatuschange)
* [run](#run)
* [supportsSubsidy](#supportssubsidy)

## Properties

### `Optional` blockHash

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

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*blockHash*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*blockNumber*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*context*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymesherror.md)

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*error*](#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`)

***

### inputArgs

• **inputArgs**: *MapMaybePostTransactionValue‹Args›*

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

arguments for the transaction. Available after the transaction starts running (may be Post Transaction Values from a previous transaction in the queue that haven't resolved yet)

***

### isCritical

• **isCritical**: *boolean*

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*isCritical*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*receipt*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*status*](#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

***

### tag

• **tag**: *TxTag*

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

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

***

### `Optional` txHash

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

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*txHash*](#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

### args

• **get args**(): *Args*

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

arguments for the transaction

**Returns:** *Args*

## Methods

### `Protected` composeTx

▸ **composeTx**(): *SubmittableExtrinsic‹"promise", ISubmittableResult›*

*Overrides void*

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

**Returns:** *SubmittableExtrinsic‹"promise", ISubmittableResult›*

***

### getFees

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

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*getFees*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*getPayingAccount*](#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›*

***

### `Protected` getProtocolFees

▸ **getProtocolFees**(): *Promise‹BigNumber›*

*Overrides void*

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

**Returns:** *Promise‹BigNumber›*

***

### `Protected` ignoresSubsidy

▸ **ignoresSubsidy**(): *boolean*

*Overrides void*

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

**Returns:** *boolean*

***

### onStatusChange

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

*Inherited from* [*PolymeshTransaction*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*onStatusChange*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransaction.md)*.*[*run*](#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*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransactionbase.md)*.*[*supportsSubsidy*](/polymesh-sdk-api-reference/docs-beta/classes/polymeshtransactionbase.md#abstract-supportssubsidy)

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

**Returns:** *boolean*


---

# 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/docs-beta/classes/polymeshtransaction.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.
