PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

gas-report.txt formatting error #10

Closed Cipher55 closed 2 years ago

Cipher55 commented 2 years ago

Been following the javascript tutorial (https://www.youtube.com/watch?v=gyMwXuJrbJQ) up to 11:45:21 when my gas-report.txt strangely stopped looking pretty and started looking like this unreadable mess.

·-------------------------|----------------------------|-------------|-----------------------------·
|   Solc version: 0.8.8   ·  Optimizer enabled: false  ·  Runs: 200  ·  Block limit: 30000000 gas  │
··························|····························|·············|······························
|  Methods                                                                                         │
·············|············|·············|··············|·············|···············|··············
|  Contract  ·  Method    ·  Min        ·  Max         ·  Avg        ·  # calls      ·  usd (avg)  │
·············|············|·············|··············|·············|···············|··············
|  FundMe    ·  fund      ·      87344  ·      104444  ·      95894  ·           10  ·          -  │
·············|············|·············|··············|·············|···············|··············
|  FundMe    ·  withdraw  ·      35585  ·       78293  ·      56939  ·            4  ·          -  │
·············|············|·············|··············|·············|···············|··············
|  Deployments            ·                                          ·  % of limit   ·             │
··························|·············|··············|·············|···············|··············
|  FundMe                 ·          -  ·           -  ·     874943  ·        2.9 %  ·          -  │
··························|·············|··············|·············|···············|··············
|  MockV3Aggregator       ·          -  ·           -  ·     569635  ·        1.9 %  ·          -  │
·-------------------------|-------------|--------------|-------------|---------------|-------------·

for reference here is the relevant section of hardhat.config.js

gasReporter: {
        enabled: true,
        outputFile: "gas-report.txt",
        nocolors: true,
        currency: "USD",
        // coinmarketcap: COINMARKETCAP_API_KEY,
        token: "MATIC",
    },
PatrickAlphaC commented 2 years ago

Weird... Are you on a windows machine?

PatrickAlphaC commented 2 years ago

It might be worth making this an issue on the gas-reporter repo... I've never seen that before with nocolors: true

https://github.com/cgewecke/hardhat-gas-reporter

Perhaps it's using the wrong config...?

Cipher55 commented 2 years ago

Weird... Are you on a windows machine?

Nope, macOS.

PatrickAlphaC commented 2 years ago

Closing this as I don't think this would be better on the gas-reporter repo.

https://github.com/cgewecke/hardhat-gas-reporter

Could you make this an issue there and let us know how it goes?

Cipher55 commented 2 years ago

Solved it, I had: nocolors: true

when it should be: noColors: true