Implements

Constructors

Properties

network: NetworkType
sender: undefined | string

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<RPCEventLogs>

    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 = '0'

      The amount to send to the contract

    • gasLimit: number = 250000

      The amount of gas units allowed

    • gasPrice: number = 5000

      The satoshi price per gas

    • abi: any[]

      The contract abi

    • changeToSender: undefined | boolean = true

    Returns Promise<any>

    see Result