Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Model<Methods>

Type Parameters

  • Methods = any

Hierarchy

Index

Constructors

Properties

_contract: Web3Contract<Methods, any>
abi: AbiItem[]
contractAddress?: string
web3Connection: Web3Connection

Accessors

  • get account(): Account
  • get web3(): default

Methods

  • callTx<ReturnData>(method: ContractCallMethod<ReturnData>, value?: any): Promise<ReturnData>
  • Return a property value from the contract

    Type Parameters

    • ReturnData = any

    Parameters

    Returns Promise<ReturnData>

  • connect(): Promise<boolean>
  • Alias for Web3Connection.connect(); Will load contract if success

    Returns Promise<boolean>

  • deploy(deployOptions: DeployOptions, account?: Account): Promise<TransactionReceipt>
  • Deploy the loaded abi contract

    Parameters

    • deployOptions: DeployOptions
    • Optional account: Account

    Returns Promise<TransactionReceipt>

  • loadAbi(): void
  • loadContract(): void
  • Preferred way of initializing and loading a contract

    throws

    Errors.MissingContractAddress

    Returns void

  • sendTx(method: ContractSendMethod, value?: any, debug?: undefined | boolean): Promise<TransactionReceipt>
  • Interact with, or change a value of, a property on the contract

    Parameters

    • method: ContractSendMethod
    • Optional value: any
    • debug: undefined | boolean = ...

    Returns Promise<TransactionReceipt>

  • sendUnsignedTx(method: ContractSendMethod, value?: any, debug?: boolean): Promise<TransactionReceipt>
  • Send unsigned transaction

    Parameters

    • method: ContractSendMethod
    • Optional value: any
    • Optional debug: boolean

    Returns Promise<TransactionReceipt>

  • start(): Promise<void>
  • Alias for Web3Connection.start(); Will load contract if success

    Returns Promise<void>

Generated using TypeDoc