Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
6746bb01
Commit
6746bb01
authored
Aug 30, 2021
by
github-actions
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transpile
384aafea
parent
2b52e1d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
hardhat.config.js
hardhat.config.js
+20
-5
No files found.
hardhat.config.js
View file @
6746bb01
/// ENVVAR
// - ENABLE_GAS_REPORT
// - CI
// - COMPILE_MODE
// - CI: output gas report to file instead of stdout
// - COVERAGE: enable coverage report
// - ENABLE_GAS_REPORT: enable gas report
// - COMPILE_MODE: production modes enables optimizations (default: development)
// - COMPILE_VERSION: compiler version (default: 0.8.3)
// - COINMARKETCAP: coinmarkercat api key for USD value in gas report
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
...
...
@@ -12,6 +15,10 @@ const argv = require('yargs/yargs')()
type
:
'boolean'
,
default
:
false
,
},
coverage
:
{
type
:
'boolean'
,
default
:
false
,
},
gas
:
{
alias
:
'enableGasReport'
,
type
:
'boolean'
,
...
...
@@ -28,11 +35,14 @@ const argv = require('yargs/yargs')()
type
:
'string'
,
default
:
'0.8.3'
,
},
coinmarketcap
:
{
alias
:
'coinmarketcapApiKey'
,
type
:
'string'
,
},
})
.
argv
;
require
(
'@nomiclabs/hardhat-truffle5'
);
require
(
'solidity-coverage'
);
if
(
argv
.
enableGasReport
)
{
require
(
'hardhat-gas-reporter'
);
...
...
@@ -59,7 +69,6 @@ module.exports = {
},
networks
:
{
hardhat
:
{
hardfork
:
process
.
env
.
COVERAGE
?
'berlin'
:
'london'
,
blockGasLimit
:
10000000
,
allowUnlimitedContractSize
:
!
withOptimizations
,
},
...
...
@@ -67,5 +76,11 @@ module.exports = {
gasReporter
:
{
currency
:
'USD'
,
outputFile
:
argv
.
ci
?
'gas-report.txt'
:
undefined
,
coinmarketcap
:
argv
.
coinmarketcap
,
},
};
if
(
argv
.
coverage
)
{
require
(
'solidity-coverage'
);
module
.
exports
.
networks
.
hardhat
.
initialBaseFeePerGas
=
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment