PolymeshTransactionBase

Wrapper class for a Polymesh Transaction

Type parameters

Values: unknown[]

Hierarchy

Index

Properties

Methods

Properties

Optional blockHash

blockHash? : undefined | string

Defined in src/base/PolymeshTransactionBase.ts:47

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


Optional blockNumber

blockNumber? : BigNumber

Defined in src/base/PolymeshTransactionBase.ts:52

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


Protected context

context: Context

Defined in src/base/PolymeshTransactionBase.ts:105


Optional error

error? : PolymeshError

Defined in src/base/PolymeshTransactionBase.ts:32

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


isCritical

isCritical: boolean

Defined in src/base/PolymeshTransactionBase.ts:57

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


Optional receipt

receipt? : ISubmittableResult

Defined in src/base/PolymeshTransactionBase.ts:37

stores the transaction receipt (if successful)


status

status: TransactionStatus = TransactionStatus.Idle

Defined in src/base/PolymeshTransactionBase.ts:27

current status of the transaction


Optional txHash

txHash? : undefined | string

Defined in src/base/PolymeshTransactionBase.ts:42

transaction hash (status: Running, Succeeded, Failed)

Methods

getFees

getFees(): Promise‹Fees | null›

Defined in src/base/PolymeshTransactionBase.ts:337

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 | null›


getPayingAccount

getPayingAccount(): Promise‹PayingAccount | null›

Defined in src/base/PolymeshTransactionBase.ts:295

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 | null›


onStatusChange

onStatusChange(listener: function): function

Defined in src/base/PolymeshTransactionBase.ts:278

Subscribe to status changes

Parameters:

listener: function

callback function that will be called whenever the status changes

▸ (transaction: this): void

Parameters:

NameType

transaction

this

Returns: function

unsubscribe function

▸ (): void


run

run(): Promise‹void›

Defined in src/base/PolymeshTransactionBase.ts:130

Run the transaction and update its status

Returns: Promise‹void›


Abstract supportsSubsidy

supportsSubsidy(): boolean

Defined in src/base/PolymeshTransactionBase.ts:393

Return whether the transaction can be subsidized. If the result is false AND the caller is being subsidized by a third party, the transaction can't be executed and trying to do so will result in an error

note this depends on the type of transaction itself (i.e. staking.bond can't be subsidized, but asset.createAsset can)

Returns: boolean

Last updated