Skip to content

Commit 977ff9c

Browse files
authored
misc: gas reporting after running tests (#243)
1 parent 08bbc59 commit 977ff9c

22 files changed

+938
-396
lines changed

.solcover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const skipFiles = ['abdk-libraries-solidity', 'bancor', 'ens', 'erc1056']
33
module.exports = {
44
providerOptions: {
55
mnemonic: 'myth like bonus scare over problem client lizard pioneer submit female collect',
6-
network_id: 15,
6+
network_id: 1337,
77
},
88
skipFiles,
99
}

buidler.config.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as dotenv from 'dotenv'
22
import { Wallet } from 'ethers'
3-
import { BuidlerConfig, task, usePlugin } from '@nomiclabs/buidler/config'
3+
import { task, usePlugin } from '@nomiclabs/buidler/config'
44

55
import { cliOpts } from './scripts/cli/constants'
66
import { migrate } from './scripts/cli/commands/migrate'
@@ -13,6 +13,7 @@ dotenv.config()
1313
usePlugin('@nomiclabs/buidler-ethers')
1414
usePlugin('@nomiclabs/buidler-etherscan')
1515
usePlugin('@nomiclabs/buidler-waffle')
16+
usePlugin('buidler-gas-reporter')
1617
usePlugin('solidity-coverage')
1718

1819
// Helpers
@@ -52,7 +53,7 @@ task('verify', 'Verify contracts in Etherscan')
5253

5354
// Config - Go to https://buidler.dev/config/ to learn more
5455

55-
const config: BuidlerConfig = {
56+
const config = {
5657
paths: {
5758
sources: './contracts',
5859
tests: './test',
@@ -68,7 +69,7 @@ const config: BuidlerConfig = {
6869
defaultNetwork: 'buidlerevm',
6970
networks: {
7071
buidlerevm: {
71-
chainId: 31337,
72+
chainId: 1337,
7273
loggingEnabled: false,
7374
gas: 8000000,
7475
gasPrice: 'auto',
@@ -134,6 +135,11 @@ const config: BuidlerConfig = {
134135
url: 'https://api-kovan.etherscan.io/api',
135136
apiKey: process.env.ETHERSCAN_API_KEY,
136137
},
138+
gasReporter: {
139+
currency: 'USD',
140+
enabled: process.env.REPORT_GAS ? true : false,
141+
outputFile: './gas-report.txt',
142+
},
137143
}
138144

139145
export default config

0 commit comments

Comments
 (0)