Polymesh SDK API Reference
beta
beta
  • Globals
  • Classes
    • Account
    • AccountManagement
    • Asset
    • AssetHolders
    • AssetPermissions
    • Assets
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • CorporateAction
    • CorporateActionBase
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identities
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Network
    • NumberedPortfolio
    • Offering
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • Settlements
    • Subsidy
    • TickerReservation
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
  • Interfaces
Powered by GitBook
On this page
  • Type parameters
  • Hierarchy
  • Index
  • Properties
  • Accessors
  • Methods
  • Properties
  • Optional blockHash
  • Optional blockNumber
  • Protected context
  • Optional error
  • inputArgs
  • isCritical
  • Optional receipt
  • status
  • tag
  • Optional txHash
  • Accessors
  • args
  • Methods
  • Protected composeTx
  • getFees
  • getPayingAccount
  • Protected getProtocolFees
  • Protected ignoresSubsidy
  • onStatusChange
  • run
  • supportsSubsidy

Was this helpful?

  1. Classes

PolymeshTransaction

Wrapper class for a Polymesh Transaction

Type parameters

▪ Args: unknown[] | []

▪ Values: unknown[]

Hierarchy

  • PolymeshTransactionBase‹Values›

    ↳ PolymeshTransaction

Index

Properties

  • blockHash

  • blockNumber

  • context

  • error

  • inputArgs

  • isCritical

  • receipt

  • status

  • tag

  • txHash

Accessors

  • args

Methods

  • composeTx

  • getFees

  • getPayingAccount

  • getProtocolFees

  • ignoresSubsidy

  • onStatusChange

  • run

  • supportsSubsidy

Properties

Optional blockHash

• blockHash? : undefined | string

Inherited from PolymeshTransaction.blockHash

Defined in src/base/PolymeshTransactionBase.ts:47

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


Optional blockNumber

• blockNumber? : BigNumber

Inherited from PolymeshTransaction.blockNumber

Defined in src/base/PolymeshTransactionBase.ts:52

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


Protected context

• context: Context

Inherited from PolymeshTransaction.context

Defined in src/base/PolymeshTransactionBase.ts:105


Optional error

• error? : PolymeshError

Inherited from PolymeshTransaction.error

Defined in src/base/PolymeshTransactionBase.ts:32

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


inputArgs

• inputArgs: MapMaybePostTransactionValue‹Args›

Defined in src/base/PolymeshTransaction.ts:46

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.isCritical

Defined in src/base/PolymeshTransactionBase.ts:57

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


Optional receipt

• receipt? : ISubmittableResult

Inherited from PolymeshTransaction.receipt

Defined in src/base/PolymeshTransactionBase.ts:37

stores the transaction receipt (if successful)


status

• status: TransactionStatus = TransactionStatus.Idle

Inherited from PolymeshTransaction.status

Defined in src/base/PolymeshTransactionBase.ts:27

current status of the transaction


tag

• tag: TxTag

Defined in src/base/PolymeshTransaction.ts:51

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


Optional txHash

• txHash? : undefined | string

Inherited from PolymeshTransaction.txHash

Defined in src/base/PolymeshTransactionBase.ts:42

transaction hash (status: Running, Succeeded, Failed)

Accessors

args

• get args(): Args

Defined in src/base/PolymeshTransaction.ts:70

arguments for the transaction

Returns: Args

Methods

Protected composeTx

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

Overrides void

Defined in src/base/PolymeshTransaction.ts:79

Returns: SubmittableExtrinsic‹"promise", ISubmittableResult›


getFees

▸ getFees(): Promise‹Fees | null›

Inherited from PolymeshTransaction.getFees

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›

Inherited from PolymeshTransaction.getPayingAccount

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›


Protected getProtocolFees

▸ getProtocolFees(): Promise‹BigNumber›

Overrides void

Defined in src/base/PolymeshTransaction.ts:86

Returns: Promise‹BigNumber›


Protected ignoresSubsidy

▸ ignoresSubsidy(): boolean

Overrides void

Defined in src/base/PolymeshTransaction.ts:94

Returns: boolean


onStatusChange

▸ onStatusChange(listener: function): function

Inherited from PolymeshTransaction.onStatusChange

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:

Name
Type

transaction

this

Returns: function

unsubscribe function

▸ (): void


run

▸ run(): Promise‹void›

Inherited from PolymeshTransaction.run

Defined in src/base/PolymeshTransactionBase.ts:130

Run the transaction and update its status

Returns: Promise‹void›


supportsSubsidy

▸ supportsSubsidy(): boolean

Overrides PolymeshTransactionBase.supportsSubsidy

Defined in src/base/PolymeshTransaction.ts:103

Returns: boolean

PreviousPolymeshErrorNextPolymeshTransactionBase

Last updated 2 years ago

Was this helpful?