Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Contract

Index

Constructors

constructor

  • Contract class to handle contract methods

    Parameters

    • abi: Abi[]

      Abi of the contract object

    • address: null | string = null

      (optional) - address to connect to

    • provider: Provider = defaultProvider

    Returns Contract

Properties

connectedTo

connectedTo: null | string = null

abi

abi: Abi[]

structs

structs: {}

Type declaration

provider

provider: Provider

Methods

connect

  • Parameters

    • address: string

    Returns Contract

Private validateMethodAndArgs

  • validateMethodAndArgs(type: "INVOKE" | "CALL", method: string, args?: Args): void
  • Parameters

    • type: "INVOKE" | "CALL"
    • method: string
    • args: Args = {}

    Returns void

Private parseResponseField

  • Parameters

    Returns Args

Private parseResponse

  • parseResponse(method: string, response: string[]): Args
  • Parameters

    • method: string
    • response: string[]

    Returns Args

invoke

call

  • call(method: string, args?: Args): Promise<Args>
  • Parameters

    • method: string
    • args: Args = {}

    Returns Promise<Args>

Generated using TypeDoc