Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Web3Contract<Methods, Events>

Type Parameters

  • Methods = any

  • Events = any

Hierarchy

  • Web3Contract

Index

Constructors

Properties

abi: AbiItem[]
address?: string
options: Web3ContractOptions = ...

Transaction options that will be used on each transaction. While this object is readonly, is values are not and can be changed.

example

myWeb3Connection.options.gas = 10000;

default

{auto: true}

self: Contract
web3: default

Accessors

  • get events(): Events
  • get methods(): Methods

Methods

  • deploy(abi: AbiItem[], deployOptions: DeployOptions, account?: Account): Promise<TransactionReceipt<any>>
  • Deploys the new AbiItem and returns its transaction receipt

    Parameters

    • abi: AbiItem[]
    • deployOptions: DeployOptions
    • Optional account: Account

    Returns Promise<TransactionReceipt<any>>

  • parseReceiptLogs<T>(receipt: TransactionReceipt<any>): TransactionReceipt<T>
  • Parses the logs of a transaction receipt using its abi events

    Type Parameters

    • T = any

    Parameters

    • receipt: TransactionReceipt<any>

    Returns TransactionReceipt<T>

  • sendSignedTx(account: Account, data: string, value?: string, txOptions: Partial<TransactionConfig>, __namedParameters?: Partial<Web3ConnectionOptions>): Promise<TransactionReceipt<any>>
  • Sends a signed transaction with the provided account

    Parameters

    • account: Account
    • data: string
    • value: string = ...
    • txOptions: Partial<TransactionConfig>
    • __namedParameters: Partial<Web3ConnectionOptions> = {}

    Returns Promise<TransactionReceipt<any>>

  • txOptions(method: ContractSendMethod, value?: string, from?: string): Promise<{ gas: undefined | number; gasPrice: undefined | string }>
  • Parameters

    • method: ContractSendMethod
    • Optional value: string
    • Optional from: string

    Returns Promise<{ gas: undefined | number; gasPrice: undefined | string }>

Generated using TypeDoc