Accept a provider to enable workflows that require communicating with the underlying blockchain network.
Accept a compilation result and process it to save all relevant resources ([[DataModel.Source | Source]], [[DataModel.Bytecode | Bytecode]], [[DataModel.Compilation | Compilation]], [[DataModel.Contract | Contract]])
This returns the same WorkflowCompileResult but with additional references to each of the added resources.
Update name pointers for this project. Currently affords name-keeping for [[DataModel.Network | Network]] and [[DataModel.Contract | Contract]] resources (e.g., naming [[DataModel.ContractInstance | ContractInstance]] resources is not supported directly)
This saves [[DataModel.NameRecord | NameRecord]] and [[DataModel.ProjectName | ProjectName]] resources to @truffle/db.
Returns a list of NameRecord resources for completeness, although these may be regarded as an internal concern. ProjectName resources are not returned because they are mutable; returned representations would be impermanent.
Either "contracts", "networks", or "contracts" | "networks".
Object whose keys belong to the set of named collection names and whose values are [[IdObject | IdObjects]] for resources of that collection.
await project.assignNames({
assignments: {
contracts: [
{ id: "<contract1-id>" },
{ id: "<contract2-id>" },
// ...
}
}
});
Run a given [[Process.Processor | Processor]] with specified arguments.
This method is a [[Meta.Process.ProcessorRunner | ProcessorRunner]] and
can be used to await (e.g.) the processors defined by
[[Process.resources | Process's resources]].
Rest ...args: AGenerated using TypeDoc
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: