Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Transaction<EmmitedEvents>

Transaction class. Used as an additional layer of abstractisation

Type parameters

  • EmmitedEvents = {}

Hierarchy

  • Transaction

Index

Constructors

constructor

  • new Transaction<EmmitedEvents>(transactionInstance: ContractSendMethod, fromAddress: string, options?: ITransactionOptions): Transaction<EmmitedEvents>
  • Transaction constructor

    Type parameters

    • EmmitedEvents = {}

    Parameters

    • transactionInstance: ContractSendMethod

      Web3 transaction instance

    • fromAddress: string

      The address from which the transaction will be sent

    • options: ITransactionOptions = {}

    Returns Transaction<EmmitedEvents>

Properties

Protected fromAddress

fromAddress: string

Protected gasPrice

gasPrice: number = 0

Protected options

options: ITransactionOptions = {}

Protected transactionInstance

transactionInstance: ContractSendMethod

Methods

encodeAbi

  • encodeAbi(): Promise<void>
  • Returns Promise<void>

estimateGas

  • estimateGas(): Promise<number>
  • Estimages the gas needed to perform the transaction

    Returns Promise<number>

    Returns the gas needed to perform the transaction

send

  • send(): Promise<default<EmmitedEvents>>
  • Sends the transaction

    Returns Promise<default<EmmitedEvents>>

    Transaction result

setGasPrice

  • setGasPrice(gasInWei: number): Promise<void>
  • Parameters

    • gasInWei: number

    Returns Promise<void>

Generated using TypeDoc