Drizzle Actions

Drizzle emits many different actions that we can hook into with Middlewares. For more information about writing middlewares for Drizzle, see the Drizzle and Contract Events tutorial.

The main categories of actions pertain to:

Fired when Drizzle begins fetching accounts.

Fired once Drizzle has successfully fetched accounts.

{
  accounts
}

accounts (array): An array of account addresses.

Fired when an account balance has been successfully fetched.

{
  address: balance
}

balance (int): The account balance, indexed by account address (string) in gwei.

Fired when Drizzle begins polling for account changes.

A sentence about the event, such as: conditions under which it fires, what it contains, etc.

{
  block
}

block (object): The block object returned by web3. See the web3 getBlock documentation for the block object's structure.

Fire when drizzle has finished initializing. Once this has fired, web3 and accounts have been intialized.

Fired when a contract event has been fired.

{
  name,
  event
}

name (string): The name of the event.

event (object): The event object returned by web3. See the web3 Contract Event documentation for the event object's structure.

A sentence about the event, such as: conditions under which it fires, what it contains, etc.

{
  txHash,
  stackId
}

txHash (string): The transaction hash.

stackId (int): An integer representing an index in the transactionStack.

A sentence about the event, such as: conditions under which it fires, what it contains, etc.

{
  confirmationReceipt,
  txHash
}

confirmationReceipt (object): The confirmation receipt returned by web3. See the web3 getTransactionReceipt documentation for the receipt object's structure.

txHash (string): The transaction hash.

A sentence about the event, such as: conditions under which it fires, what it contains, etc.

{
  receipt,
  txHash
}

receipt (object): The transaction receipt returned by web3. See the web3 getTransactionReceipt documentation for the receipt object's structure.

txHash (string): The transaction hash.

A sentence about the event, such as: conditions under which it fires, what it contains, etc.

{
  error,
  stackTempKey
}

error (object): An error object, containig a message, if provided. Empty object if the transaction failed as a result of user rejection via their wallet.

stackTempKey (string): If the transaction experienced an erorr before broadcasting (such as a rejection), this key will be filled on the transactionStack rather than a transaction hash to prevent stack index collisions.