-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate test suite to ethers and optimise
- Loading branch information
1 parent
8d4d5c0
commit 6812cf7
Showing
96 changed files
with
14,173 additions
and
22,464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ node_modules/ | |
.idea/ | ||
cache/ | ||
artifacts/ | ||
.env | ||
.env | ||
coverage/ | ||
coverage.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
require('dotenv').config(); | ||
require('@nomicfoundation/hardhat-ethers'); | ||
|
||
// Importing babel to be able to use ES6 imports | ||
require('@babel/register')({ | ||
presets: [ | ||
['@babel/preset-env', { | ||
'targets': { | ||
'node': '16', | ||
}, | ||
}], | ||
], | ||
only: [/test|scripts/], | ||
retainLines: true, | ||
}); | ||
require('@babel/polyfill'); | ||
|
||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
module.exports = { | ||
solidity: { | ||
compilers: [ | ||
{ | ||
version: '0.7.6', | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 15000, | ||
}, | ||
}, | ||
}, | ||
{ | ||
version: '0.8.18', | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 15000, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
networks: {}, | ||
paths: { | ||
sources: './contracts', | ||
tests: './test', | ||
cache: './cache', | ||
artifacts: './artifacts', | ||
}, | ||
mocha: { | ||
timeout: 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
let common = require('./hardhat-common.config.js'); | ||
|
||
// Config from environment | ||
const mainnetProviderUrl = process.env.MAINNET_PROVIDER_URL || 'http://localhost:8545'; | ||
|
||
module.exports = Object.assign(common, { | ||
networks: { | ||
hardhat: { | ||
forking: { | ||
url: mainnetProviderUrl, | ||
}, | ||
}, | ||
}, | ||
paths: { | ||
tests: './test-fork', | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.