PolyTransaction
Last updated
Was this helpful?
Last updated
Was this helpful?
Wrapper class for a Polymath Transaction
▪ Args
▪ Values: any[]
‹void›
↳ PolyTransaction
Creates a poly transaction
Parameters:
Name
Type
transaction
transactionQueue
• args: TransactionSpec["args"]
arguments with which the transaction will be called
Optional
errorstores errors thrown while running the transaction (if any)
• promise: Promise‹any›
internal promise that resolves when the transaction has finished running
Optional
receipt• receipt? : TransactionReceiptWithDecodedLogs | string
stores the transaction receipt (if successful)
current status of the transaction
type of transaction represented by this instance for display purposes
transaction queue to which this transaction belongs
Optional
txHash• txHash? : undefined | string
transaction hash (available after running)
• uid: string
unique generated identifier of the poly transaction
▸ _refresh(): void
Hydrate the entity
Returns: void
▸ onStatusChange(listener
: function): (Anonymous function)
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(): Promise‹void›
Run the poly transaction and update the transaction status
Returns: Promise‹void›
▸ toPojo(): object
Convert entity to a POJO (Plain Old Javascript Object)
Returns: object
args: any = filteredArgs as any
receipt: undefined | string | TransactionReceiptWithDecodedLogs
transactionQueueUid: string
txHash: undefined | string
uid: string
Static
generateId▸ generateId(): string
Generate the Poly Transaction's UUID from its identifying properties
Returns: string
+ new PolyTransaction(transaction
: ‹Args, Values, TransactionReceiptWithDecodedLogs | string›, transactionQueue
: ‹any, any›):
Defined in
‹Args, Values, TransactionReceiptWithDecodedLogs | string›
‹any, any›
Returns:
Defined in
• error? :
Defined in
Defined in
Defined in
• status: = TransactionStatus.Idle
Defined in
• tag:
Defined in
• transactionQueue:
Defined in
Defined in
Overrides .
Defined in
Overrides .
Defined in
Defined in
Defined in
Overrides .
Defined in
error: undefined |
status:
tag:
Defined in