DimensionDev / DimensionDev/SmartContractProjectConfig
Get stuck while running test after import hardhat-gas-reporter
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Version Info:
- hardhat: 2.8.3
- hardhat-gas-reporter: 1.0.7
- OS:macOS Big Sur 11.6
Problem:
I get stuck when I run test after hardhat-gas-reporter was imported in hardhat.config.ts. The log of npm run test is listed below:
npm verb cli[⠂⠂⠂⠂⠂⸩ ⠧ : timing npm:load Completed in 27ms
npm verb cli './.nvm/versions/node/v16.10.0/bin/node',
npm verb cli './.nvm/versions/node/v16.10.0/lib/node_modules/npm/bin/npm-cli.js',
npm verb cli 'exec',
npm verb cli '--',
npm verb cli 'hardhat',
npm verb cli 'test'
npm verb cli ]
npm info using npm @7.24.0
npm info using node @v16.10.0
npm timing npm: load:whichnode Completed in 1ms
npm timing config: load:defaults Completed in 1ms
npm timing config: load: file: /.nvm / versions / node / v16.10.0 / lib / node_modules / npm / npmrc Completed in 0ms
npm timing config: load:builtin Completed in 0ms
npm timing config: load:cli Completed in 2ms
npm timing config: load:env Completed in 0ms
npm timing config: load: file: [ProjectDir]/.npmrc Completed in 0ms
npm timing config: load:project Completed in 1ms
npm timing config: load: file: /.npmrc Completed in 0ms
npm timing config: load:user Completed in 0ms
npm timing config: load: file: /.nvm / versions / node / v16.10.0 / etc / npmrc Completed in 0ms
npm timing config: load: global Completed in 0ms
npm timing config: load:validate Completed in 1ms
npm timing config: load:credentials Completed in 1ms
npm timing config: load:setEnvs Completed in 0ms
npm timing config:load Completed in 6ms
npm timing npm: load:configload Completed in 6ms
npm timing npm: load:setTitle Completed in 15ms
npm timing npm: load:setupLog Completed in 0ms
npm timing config: load:flatten Completed in 3ms
npm timing npm: load:cleanupLog Completed in 1ms
npm timing npm: load:configScope Completed in 0ms
npm timing npm: load:projectScope Completed in 1ms
npm timing npm:load Completed in 31ms
Warning: loading secrets from tempalte file, might be invalid
⸨⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠧ : timing npm:load Completed in 27ms
Solution:
Try to modify the config of hardhat-gas-reporter with the following configuration:
gasReporter = {
currency: 'USD',
gasPrice: 21,
enabled: (process.env.REPORT_GAS) ? true : false
}
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in hardhat.config.ts und vergleiche die Einstellungen von hardhat-gas-reporter mit der in der Issue gezeigten Konfiguration. Führe npm run test mit importiertem Reporter aus und überprüfe anschließend, dass der Befehl nicht mehr hängen bleibt, wenn REPORT_GAS nicht gesetzt ist; die Änderung ist abgeschlossen, wenn die Tests normal beendet werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- testing-qa, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100