Skip to content

Commit 562f17d

Browse files
committed
update to hardhat
1 parent 7860eeb commit 562f17d

15 files changed

+2017
-2556
lines changed

buidler.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

hardhat.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { HardhatUserConfig } from 'hardhat/config'
2+
3+
import '@nomiclabs/hardhat-ethers'
4+
import '@nomiclabs/hardhat-waffle'
5+
import '@openzeppelin/hardhat-upgrades'
6+
import 'solidity-coverage'
7+
8+
require('./scripts/deploy')
9+
10+
export default {
11+
solidity: {
12+
version: '0.4.24',
13+
},
14+
mocha: {
15+
timeout: 100000,
16+
},
17+
} as HardhatUserConfig

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"license": "ISC",
1919
"author": "dev-support@ampleforth.org",
2020
"scripts": {
21-
"compile": "yarn buidler compile",
22-
"test": "yarn buidler test",
23-
"coverage": "yarn buidler coverage --testfiles 'test/unit/*.ts'",
21+
"compile": "yarn hardhat compile",
22+
"test": "yarn hardhat test",
23+
"coverage": "yarn hardhat coverage --testfiles 'test/unit/*.ts'",
2424
"format": "yarn prettier --config .prettierrc --write '**/*.ts' 'contracts/**/*.sol'",
2525
"lint": "yarn solhint 'contracts/**/*.sol'"
2626
},
@@ -29,24 +29,24 @@
2929
"lint"
3030
],
3131
"devDependencies": {
32-
"@nomiclabs/buidler": "^1.4.5",
33-
"@nomiclabs/buidler-ethers": "^2.0.0",
34-
"@nomiclabs/buidler-waffle": "^2.1.0",
35-
"@openzeppelin/buidler-upgrades": "^1.0.2",
32+
"@nomiclabs/hardhat-ethers": "^2.0.1",
33+
"@nomiclabs/hardhat-waffle": "^2.0.1",
34+
"@openzeppelin/hardhat-upgrades": "^1.4.3",
3635
"@types/chai": "^4.2.12",
3736
"@types/mocha": "^8.0.3",
3837
"@types/node": "^14.6.1",
3938
"bignumber.js": "^9.0.0",
4039
"chai": "^4.2.0",
41-
"ethereum-waffle": "^3.0.0",
42-
"ethers": "^5.0.13",
40+
"ethereum-waffle": "^3.2.1",
41+
"ethers": "^5.0.24",
42+
"hardhat": "^2.0.6",
4343
"pre-commit": "^1.2.2",
4444
"prettier": "^2.1.1",
4545
"prettier-plugin-solidity": "^1.0.0-alpha.57",
4646
"solc": "0.4.24",
4747
"solhint": "^3.2.0",
4848
"solhint-plugin-prettier": "^0.0.5",
49-
"solidity-coverage": "^0.7.10",
49+
"solidity-coverage": "^0.7.13",
5050
"stochasm": "^0.5.0",
5151
"ts-node": "^9.0.0",
5252
"typescript": "^4.0.2"

scripts/deploy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { task } from '@nomiclabs/buidler/config'
1+
import { task } from 'hardhat/config'
22
import { getAdminAddress } from '@openzeppelin/upgrades-core'
33
import ProxyAdmin from '@openzeppelin/upgrades-core/artifacts/ProxyAdmin.json'
44
import MultiSigWallet from './MultiSigWalletWithDailyLimit.json'
5-
import { Interface } from 'ethers/lib/utils'
5+
import { Interface } from '@ethersproject/abi'
66
import { TransactionReceipt } from '@ethersproject/providers'
77

88
const parseEvents = (

test/simulation/supply_precision.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- the difference in totalSupply() before and after the rebase(+1) should be exactly 1.
77
*/
88

9-
import { ethers, upgrades } from '@nomiclabs/buidler'
9+
import { ethers, upgrades } from 'hardhat'
1010
import { expect } from 'chai'
1111

1212
async function exec() {

test/simulation/transfer_precision.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
increased by x fragments.
1010
*/
1111

12-
import { ethers, upgrades } from '@nomiclabs/buidler'
12+
import { ethers, upgrades } from 'hardhat'
1313
import { expect } from 'chai'
1414
import { BigNumber, BigNumberish, Contract, Signer } from 'ethers'
1515
import { imul } from '../utils/utils'

test/unit/Orchestrator.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { ethers, waffle } from '@nomiclabs/buidler'
1+
import { ethers, waffle } from 'hardhat'
22
import { Contract, Signer } from 'ethers'
33
import { increaseTime } from '../utils/utils'
44
import { expect } from 'chai'
5+
import { TransactionResponse } from '@ethersproject/providers'
56

67
let orchestrator: Contract, mockPolicy: Contract, mockDownstream: Contract
7-
let r: any
8+
let r: Promise<TransactionResponse>
89
let deployer: Signer, user: Signer
910

1011
async function mockedOrchestrator() {

test/unit/SafeMathInt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ethers } from '@nomiclabs/buidler'
1+
import { ethers } from 'hardhat'
22
import { Contract } from 'ethers'
33
import { expect } from 'chai'
44

test/unit/UFragments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ethers, upgrades } from '@nomiclabs/buidler'
1+
import { ethers, upgrades } from 'hardhat'
22
import { Contract, Signer, BigNumber } from 'ethers'
33
import { expect } from 'chai'
44

test/unit/UFragmentsPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ethers, upgrades, waffle } from '@nomiclabs/buidler'
1+
import { ethers, upgrades, waffle } from 'hardhat'
22
import { Contract, Signer, BigNumber, BigNumberish, Event } from 'ethers'
33
import { TransactionResponse } from '@ethersproject/providers'
44
import { expect } from 'chai'

0 commit comments

Comments
 (0)