Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Project

Abstraction for connecting @truffle/db to a Truffle project

This class affords an interface between Truffle and @truffle/db, specifically for the purposes of ingesting @truffle/workflow-compile results and contract instance information from @truffle/contract-schema artifact files.

Unless you are building tools that work with Truffle's various packages directly, you probably don't need to use this class.

example

To instantiate this abstraction:

import { connect, Project } from "@truffle/db";

const db = connect({
  // ...
});

const project = await Project.initialize({
  db,
  project: {
    directory: "/path/to/project/dir"
  }
});

Hierarchy

Index

Constructor

Truffle-specific

Other

Processor

Constructor

connect

Truffle-specific

loadCompile

  • loadCompile(options: { result: WorkflowCompileResult }): Promise<{ compilations: Compilation[]; contracts: Contract[] }>

Other

id

  • get id(): string

assignNames

Processor

run

Generated using TypeDoc