Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BroadcastActivityPayouts

label

PAYOUT

description

The implementation for the payout preparation scheduler. Contains source code for the execution logic of a command with name: processor:BroadcastActivityPayouts.

Notably, this command fetches activities that have not been the subject of payouts yet and then creates transactions and signs transactions.

since

v0.4.0

Hierarchy

Index

Constructors

Properties

activitiesService: ActivitiesService
argv: string[] = []

The arguments passed to the command. Typically, this holds required parameters of commands.

access

protected

var

{string[]}

assetsService: AssetsService
batchSize: number

Contains the size of batches. This field is only used given BroadcastPayouts.enableBatches is true and determines the size of transaction batches.

access

protected

var

{number}

configService: ConfigService<Record<string, unknown>, false>
dappConfig: DappConfig

The internal dApp configuration object. This object is used to configure key functionalities such as the name of a dApp and the enabled scopes of the backend runtime.

access

protected

var

{DappConfig}

enableBatches: boolean

Contains a boolean value that determines whether transactions must be batched if possible (aggregate complete).

access

protected

var

{boolean}

globalDryRun: boolean

Contains a boolean value that determines whether the runtime is currently using a global dry-run mode.

Note that dry-run mode disables payout broadcasts, as such transactions will not appear on dHealth Network.

access

protected

var

{boolean}

logService: LogService
logger: LogService
networkConfig: NetworkConfig

The internal dApp network configuration object. This object is used to configure the access to the underlying blockchain network.

access

protected

var

{NetworkConfig}

networkService: NetworkService
payoutsService: PayoutsService
scope: string = "payout"

The command scope. This is the scope that must be enabled through the configuration files for this command to be available.

This property is required through the extension of BaseCommand.

access

protected

var

{Scope}

signerService: SignerService

Requires state information of the module. This object is typically populated upon first execution and updated any time later.

see

StateService

access

protected

var

{StateDocument}

stateService: StateService
transactionHashes: string[]

Contains an array of transaction hashes that are ready to be broadcast to the network.

access

protected

var

{string[]}

transactions: Record<string, TransferTransaction>

Memory store for all transactions that must be broadcast during this execution of the command.

access

protected

var

{Record<string, TransferTransaction>}

Accessors

  • get collection(): string
  • get command(): string
  • get signature(): string
  • get stateIdentifier(): string
  • Getter for the discovery state identifier, e.g. "discovery.accounts", "discovery.transactions", "payout.outputs" etc.

    This method is an implementation necessary because of the extensions of StatefulModule.

    see

    StatefulModule

    access

    public

    var

    {string}

    Returns string

Methods

  • countSubjects(): Promise<number>
  • debugLog(message: string): void
  • errorLog(message: string, stack?: string): void
  • infoLog(message: string): void
  • This method is the entry point of any command line executed command. nest-commander implements a flow where this method is called with parameters that are respectively the raw arguments and the parsed arguments to this command call.

    This method uses the stateService to fetch the current execution and also uses it to update the state.

    Note that the runWithOptions method is called inside a try-catch block to force the error handling process.

    access

    public

    Parameters

    Returns Promise<void>

  • runAsScheduler(): Promise<void>
  • This method is the entry point of this scheduler. Due to the usage of the Cron decorator, and the implementation the nest backend runtime is able to discover this when the processor scope is enabled.

    This method is necessary to make sure this command is run with the correct --signer option.

    This scheduler is registered to run every minute at the fifth second.

    see

    BaseCommand

    access

    public

    async

    Returns Promise<void>

  • usage(): string
  • This method prints usage information to the command line and is used by nest-commander to print a correctly formatted help message.

    Note that usage methods can be overwritten but must always print a standard command line signature.

    access

    public

    Returns string

Generated using TypeDoc