Naughty Push Message

    @nomiclabs/hardhat-solpp
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    npm hardhat

    hardhat-solpp

    Hardhat plugin for integration with the solpp preprocessor.

    What

    This plugin hooks into the compilation pipeline and runs the solpp preprocessor.

    Installation

    npm install --save-dev @nomiclabs/hardhat-solpp

    And add the following statement to your hardhat.config.js:

    require("@nomiclabs/hardhat-solpp");

    Or, if you are using TypeScript, add this to your hardhat.config.ts:

    import "@nomiclabs/hardhat-solpp";

    Environment extensions

    This plugin does not extend the environment.

    Usage

    There are no additional steps you need to take for this plugin to work.

    Install it, run npx hardhat compile and solc will compile the solpp generated contracts, which will be in cache/solpp-generated-contracts.

    Configuration

    This plugin can by configured by setting a solpp entry in hardhat.config.js. Its options are:

    • defs: is an object where each property is the symbol's name and its value is the actual definition. Definitions can be numbers, string, expressions, lists, or functions. For more detail about symbols you can check solpp README.
    • cwd: string: directory where the contracts are located, it will be used for flattening purposes, by default it will be the project's source directory.
    • collapseEmptyLines: boolean: delete empty lines, false by default.
    • noPreprocessor: boolean: disable preprocessor, false by default.
    • noFlatten: boolean: won't flatten contracts, true by default.
    • tolerant: boolean: ignore if an imported contract file is missing when flattening, false by default.

    Install

    npm i @nomiclabs/hardhat-solpp

    DownloadsWeekly Downloads

    1,724

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    14 kB

    Total Files

    18

    Last publish

    Collaborators

    • geneaum
    • fzeoli
    • alcuadrado
    • fvictorio