Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetlineBlockchain

Implementation of the Blockchain interface that uses the Getline metabackend and web3.

Hierarchy

  • GetlineBlockchain

Index

Constructors

constructor

Properties

Private contractDefinitions

contractDefinitions: Array<pb.Contract> | undefined

Private metabackend

metabackend: MetabackendClient

Private network

network: string

Private web3

web3: Web3

Methods

blockToTime

  • blockToTime(current: BigNumber, block: BigNumber): Moment
  • Parameters

    • current: BigNumber
    • block: BigNumber

    Returns Moment

coinbase

currentBlock

  • currentBlock(): Promise<BigNumber>

deploy

  • deploy(contractName: string, ...params: Array<any>): Promise<Contract>

existing

Private waitContractDeployed

  • waitContractDeployed(hash: string, name: string): Promise<Contract>
  • Waits until a given contract is deployed on the network.

    Parameters

    • hash: string

      Transactiion hash of transaction that deployed contract.

    • name: string

      Name of contract.

    Returns Promise<Contract>

    Newly deployed contract.

waitTxMined

  • waitTxMined(hash: string): Promise<void>
  • Waits until a given transaction hash is present on the blockchain.

    This is a hack that had to be written for when web3.ether.contract.new fails to run the creation callback for the second time. When we upgrade to web3 1.0 or another library we should be able to get rid of this.

    Parameters

    • hash: string

      Hash of transaction to look for.

    Returns Promise<void>

Generated using TypeDoc