PolyTransaction

Wrapper class for a Polymath Transaction

Type parameters

Args

Values: any[]

Hierarchy

  • Entity‹void›

    PolyTransaction

Index

Constructors

Properties

Methods

Constructors

constructor

+ new PolyTransaction(transaction: TransactionSpec‹Args, Values, TransactionReceiptWithDecodedLogs | string›, transactionQueue: TransactionQueue‹any, any›): PolyTransaction

Defined in src/entities/PolyTransaction.ts:114

Creates a poly transaction

Parameters:

Name

Type

transaction

TransactionSpec‹Args, Values, TransactionReceiptWithDecodedLogs | string›

transactionQueue

TransactionQueue‹any, any›

Returns: PolyTransaction

Properties

args

args: TransactionSpec["args"]

Defined in src/entities/PolyTransaction.ts:89

arguments with which the transaction will be called

Optional error

error? : PolymathError

Defined in src/entities/PolyTransaction.ts:69

stores errors thrown while running the transaction (if any)

promise

promise: Promise‹any›

Defined in src/entities/PolyTransaction.ts:64

internal promise that resolves when the transaction has finished running

Optional receipt

receipt? : TransactionReceiptWithDecodedLogs | string

Defined in src/entities/PolyTransaction.ts:74

stores the transaction receipt (if successful)

status

status: TransactionStatus = TransactionStatus.Idle

Defined in src/entities/PolyTransaction.ts:54

current status of the transaction

tag

tag: PolyTransactionTag

Defined in src/entities/PolyTransaction.ts:79

type of transaction represented by this instance for display purposes

transactionQueue

transactionQueue: TransactionQueue

Defined in src/entities/PolyTransaction.ts:59

transaction queue to which this transaction belongs

Optional txHash

txHash? : undefined | string

Defined in src/entities/PolyTransaction.ts:84

transaction hash (available after running)

uid

uid: string

Overrides Entity.uid

Defined in src/entities/PolyTransaction.ts:49

unique generated identifier of the poly transaction

Methods

_refresh

_refresh(): void

Overrides Entity._refresh

Defined in src/entities/PolyTransaction.ts:330

Hydrate the entity

Returns: void

onStatusChange

onStatusChange(listener: function): (Anonymous function)

Defined in src/entities/PolyTransaction.ts:203

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: (Anonymous function)

unsubscribe function

run

run(): Promise‹void›

Defined in src/entities/PolyTransaction.ts:171

Run the poly transaction and update the transaction status

Returns: Promise‹void›

toPojo

toPojo(): object

Overrides Entity.toPojo

Defined in src/entities/PolyTransaction.ts:144

Convert entity to a POJO (Plain Old Javascript Object)

Returns: object

Static generateId

generateId(): string

Defined in src/entities/PolyTransaction.ts:40

Generate the Poly Transaction's UUID from its identifying properties

Returns: string

Last updated