Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file improvements #166

Closed
sz-piotr opened this issue Dec 20, 2019 · 0 comments
Closed

Config file improvements #166

sz-piotr opened this issue Dec 20, 2019 · 0 comments
Labels
waffle-3.0.0 Part of the improvements for Waffle 3

Comments

@sz-piotr
Copy link
Contributor

sz-piotr commented Dec 20, 2019

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';
}
@sz-piotr sz-piotr added the waffle-3.0.0 Part of the improvements for Waffle 3 label Dec 20, 2019
@sz-piotr sz-piotr mentioned this issue Dec 20, 2019
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waffle-3.0.0 Part of the improvements for Waffle 3
Projects
None yet
Development

No branches or pull requests

1 participant