Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "cli/utils"

Index

Variables

Const docker

docker: Docker = new Docker()

Const exists

exists: __promisify__ = promisify(existsCallback)

Const glob

glob: __promisify__ = promisify(globCallback)

Const mkdirp

mkdirp: function = promisify(mkdirpCallback)

Type declaration

    • (arg1: T1): Promise<void>
    • Parameters

      • arg1: T1

      Returns Promise<void>

Const rimraf

rimraf: __promisify__ = promisify(rimrafCallback)

Const writeFile

writeFile: __promisify__ = promisify(writeFileCallback)

Functions

Const build

  • build(contractPath: string): Promise<void>
  • Builds contract resources for contract at path

    Parameters

    • contractPath: string

      Local path to C++ contract file

    Returns Promise<void>

Const buildAll

  • buildAll(match?: string[]): Promise<void>
  • Finds and builds all C++ contracts

    Parameters

    • Optional match: string[]

      Optional specific contract identifiers to build

    Returns Promise<void>

Const buildImage

  • buildImage(): Promise<void>
  • Configures and builds the docker image

    Returns Promise<void>

Const compileContract

  • compileContract(contractPath: string): Promise<void>
  • Compiles a C++ EOSIO smart contract at path

    Parameters

    • contractPath: string

      Full path to C++ contract file

    Returns Promise<void>

Const dockerImageName

  • dockerImageName(): Promise<string>
  • Constructs the name of the current Lamington Docker image

    Returns Promise<string>

    Docker image name

Const eosIsReady

  • eosIsReady(): Promise<boolean>
  • Determines if EOS is available using the get_info query response

    Returns Promise<boolean>

    EOS instance availability

Const filterMatches

  • filterMatches(paths: string[]): string[]
  • Parameters

    • paths: string[]

    Returns string[]

Const imageExists

  • imageExists(): Promise<boolean>
  • Determines if the docker image exists

    Returns Promise<boolean>

    Result of search

Const onlyMatches

  • onlyMatches(paths: string[], matches?: string[]): string[]
  • Parameters

    • paths: string[]
    • Default value matches: string[] = []

    Returns string[]

Const outputPathForContract

  • outputPathForContract(contractPath: string): string
  • Determines the output location for a contract based on the full path of its C++ file.

    Parameters

    • contractPath: string

      Full path to C++ contract file

    Returns string

    Output path for contract compilation artefacts

Const pathToIdentifier

  • pathToIdentifier(filePath: string): string
  • Resolves the path to file identifier. This is the path without trailing file extension

    Parameters

    • filePath: string

      Path to file

    Returns string

    Identifier path

Const runTests

  • runTests(): Promise<void>
  • Loads all test files and executes with Mocha

    Returns Promise<void>

Const startContainer

  • startContainer(): Promise<void>
  • Starts the Lamington container

    Returns Promise<void>

Const startEos

  • startEos(): Promise<void>
  • Pulls the EOSIO docker image if it doesn't exist and starts a new EOSIO docker container

    Returns Promise<void>

Const stopContainer

  • stopContainer(): Promise<void>
  • Stops the current Lamington container

    Returns Promise<void>

    Docker command promise

Const untilEosIsReady

  • untilEosIsReady(attempts?: number): Promise<boolean>
  • Sleeps the process until the EOS instance is available

    Parameters

    • Default value attempts: number = MAX_CONNECTION_ATTEMPTS

    Returns Promise<boolean>

    Connection success or throws error

Const versionFromUrl

  • versionFromUrl(url: string): string
  • Extracts the version identifier from a string

    Parameters

    • url: string

    Returns string

    Version identifier

Generated using TypeDoc