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>
  • Deploys the new AbiItem and returns its transaction receipt

    Parameters

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

    Returns Promise<TransactionReceipt>

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

    Parameters

    • account: Account
    • data: string
    • value: string = ...
    • txOptions: Partial<TransactionConfig>
    • Optional debug: boolean

    Returns Promise<TransactionReceipt>

  • 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