Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Setting 'artifactType' breaks the gas report #226

Closed
PaulRBerg opened this issue Oct 20, 2020 · 6 comments
Closed

Setting 'artifactType' breaks the gas report #226

PaulRBerg opened this issue Oct 20, 2020 · 6 comments

Comments

@PaulRBerg
Copy link

PaulRBerg commented Oct 20, 2020

Description

Setting any value to artifactType, even a correct value like "truffle-v5" or "buidler-v1", breaks the gas report:

Capture d’écran 2020-10-20 à 20 00 10

Steps to Reproduce

  1. Fork mainframe-lending-protocol
  2. Switch to the gasReporterBug branch
  3. Install dependencies with yarn
  4. Uncomment "artifactType" line in buidler.config.ts
  5. Run tests via yarn run (don't worry, I set .only on a describe so that it doesn't take long)

Environment

@PaulRBerg
Copy link
Author

It possibly has to do with this line:

https://github.com/cgewecke/buidler-gas-reporter/blob/master/src/index.ts#L75

@cgewecke
Copy link
Owner

@PaulRBerg

What are you trying to do when using this setting? The docs on this aren't super clear (sorry) but the core idea is that you could write a method which translates the artifact format of the development platform you're working with into something the reporter can process.

For buidler this is already done as part of buidler-gas-reporter here

@PaulRBerg
Copy link
Author

PaulRBerg commented Oct 20, 2020

I'm not trying to achieve anything in particular except get myself familiar with the API and run the gas reporter.

In the README, it says that "artifactType" is either a function or a string. I went with the latter and set the value in the "gasReporter" config in buidler.config.ts, but it broke the gas report.

@cgewecke
Copy link
Owner

@PaulRBerg

Yes tbh it's not really meant to be used with buidler.

Was added mostly to try to help address #128 and make buidler-gas-reporter-like integrations possible.

Thanks for finding this...it's not very well explained.

@PaulRBerg
Copy link
Author

Happy to help. Sorry, I guess I should've opened this in the buidler-gas-reporter repo instead.

@PaulRBerg PaulRBerg changed the title Setting 'artifactType' break report Setting 'artifactType' breaks the gas report Oct 21, 2020
@cgewecke
Copy link
Owner

Hi! eth-gas-reporter is being deprecated in favor of hardhat-gas-reporter.

In the latest version at Hardhat, artifactType has been removed (it's just an HH plugin now).

https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants