Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Config file improvements #166

Copy link
Copy link

Description

@sz-piotr
Issue body actions

The config used currently by waffle is a result of incrementally adding new options without regard for existing ones. The proposed config unifies the options and allows for better user experience.

The values will be checked in runtime for correctness. Changing the config will also open a path for usability improvements for specifying compiler versions. The resulting code will be fully backwards compatible and will issue proper deprecation warnings to smoothen the transition.

The new code will also lay a foundation for future config extensions in a more organised manner.

export interface Config {
  /** Location of the project sources e.g. ./contracts */
  sourceDirectory: string;
  /** Location of the compilation artifacts e.g. ./dist */
  outputDirectory: string;
  /** Location of the dependencies e.g. ./node_modules */
  nodeModulesDirectory: string;

  /**
   * Compiler type:
   * - native - uses local installation of solc
   * - dockerized-solc - uses solc from a docker image
   * - solcjs - uses solc from the solcjs npm package
   */
  compilerType: 'native' | 'dockerized-solc' | 'solcjs';
  /** Version of the solidity compiler e.g. "0.5.1" or "default" */
  compilerVersion: string;
  /**
   * Additional allowed paths for the compiler.
   * Only used for native compiler type.
   */
  compilerAllowedPaths: string[];
  /** Options passed to the compiler */
  compilerOptions: object;

  /** Include the humanReadableAbi format */
  outputHumanReadableAbi: boolean;
  /**
   * What files should be outputted
   * - multiple - single file for each contract
   * - combined - single file for all contracts
   * - all - both of the above
   */
  outputType: 'multiple' | 'combined' | 'all';
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    waffle-3.0.0Part of the improvements for Waffle 3Part of the improvements for Waffle 3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.