How to use the @truffle/workflow-compile/new.compile function in @truffle/workflow-compile

To help you get started, we’ve selected a few @truffle/workflow-compile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trufflesuite / truffle / packages / truffle-db / src / loaders / artifacts / index.ts View on Github external
async loadCompilation(compilationConfig: CompilationConfigObject) {
    const compilationOutput = await Contracts.compile(compilationConfig);
    const contracts = compilationOutput.compilations;

    const compilationObjects = await Promise.all(
      Object.values(contracts)
        .filter(contracts => contracts["contracts"].length > 0)
        .map(({ contracts }) => {
          return this.setCompilation(contracts);
        })
    );

    const compilations = await this.db.query(AddCompilation, {
      compilations: compilationObjects
    });

    return { compilations, contracts };
  }

@truffle/workflow-compile

Core workflow behavior for `truffle compile` command

MIT
Latest version published 1 year ago

Package Health Score

50 / 100
Full package analysis

Similar packages