Implements

Constructors

Properties

network: NetworkType

Methods

  • Perform calltocontract

    Parameters

    • contract: string

      The contract address

    • method: string

      The contract method to call

    • data: any[]

      The arguments

    • abi: any[]

      The contract abi

    Returns Promise<undefined | Result>

    see Result

  • Search events from a contract

    Parameters

    • contract: string

      transaction object

    • Optionaltopics: string[]

      the topics to filter by

    • fromBlock: undefined | number = 0

      the starting block height to filter by defaults to 0

    • toBlock: undefined | number = -1

      the end block height to filter by, defaults to -1 for most recent block

    Returns Promise<APIEventLogs>

    an EventLogs object

  • Perform sendtocontract

    Parameters

    • contract: string

      The contract address

    • method: string

      The contract method to send to

    • data: any[]

      The arguments to use

    • value: string

      The amount to send to the contract

    • gasLimit: number

      The amount of gas units allowed

    • gasPrice: number

      The satoshi price per gas

    • abi: any[]

      The contract abi

    Returns Promise<any>

    see Result