Browse Source

Update lockfile (#2787)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
renovate[bot] 4 years ago
parent
commit
73425c22d8
4 changed files with 14 additions and 19933 deletions
  1. 1 0
      hardhat.config.js
  2. 1 19922
      package-lock.json
  3. 3 2
      package.json
  4. 9 9
      test/finance/PaymentSplitter.test.js

+ 1 - 0
hardhat.config.js

@@ -59,6 +59,7 @@ module.exports = {
   },
   networks: {
     hardhat: {
+      hardfork: process.env.COVERAGE ? 'berlin' : 'london',
       blockGasLimit: 10000000,
       allowUnlimitedContractSize: !withOptimizations,
     },

File diff suppressed because it is too large
+ 1 - 19922
package-lock.json


+ 3 - 2
package.json

@@ -12,7 +12,7 @@
   },
   "scripts": {
     "compile": "hardhat compile",
-    "coverage": "hardhat coverage",
+    "coverage": "env COVERAGE=true hardhat coverage",
     "docs": "oz-docs",
     "docs:watch": "npm run docs watch contracts 'docs/*.hbs' docs/helpers.js",
     "prepare-docs": "scripts/prepare-docs.sh",
@@ -53,7 +53,8 @@
     "@nomiclabs/hardhat-truffle5": "^2.0.0",
     "@nomiclabs/hardhat-web3": "^2.0.0",
     "@openzeppelin/docs-utils": "^0.1.0",
-    "@openzeppelin/test-helpers": "^0.5.9",
+    "@openzeppelin/test-helpers": "^0.5.13",
+    "@truffle/abi-utils": "^0.2.3",
     "chai": "^4.2.0",
     "eslint": "^6.5.1",
     "eslint-config-standard": "^14.1.1",

+ 9 - 9
test/finance/PaymentSplitter.test.js

@@ -102,21 +102,21 @@ contract('PaymentSplitter', function (accounts) {
 
       // distribute to payees
 
-      const initAmount1 = await balance.current(payee1);
-      const { logs: logs1 } = await this.contract.release(payee1, { gasPrice: 0 });
-      const profit1 = (await balance.current(payee1)).sub(initAmount1);
+      const tracker1 = await balance.tracker(payee1);
+      const { logs: logs1 } = await this.contract.release(payee1);
+      const profit1 = await tracker1.delta();
       expect(profit1).to.be.bignumber.equal(ether('0.20'));
       expectEvent.inLogs(logs1, 'PaymentReleased', { to: payee1, amount: profit1 });
 
-      const initAmount2 = await balance.current(payee2);
-      const { logs: logs2 } = await this.contract.release(payee2, { gasPrice: 0 });
-      const profit2 = (await balance.current(payee2)).sub(initAmount2);
+      const tracker2 = await balance.tracker(payee2);
+      const { logs: logs2 } = await this.contract.release(payee2);
+      const profit2 = await tracker2.delta();
       expect(profit2).to.be.bignumber.equal(ether('0.10'));
       expectEvent.inLogs(logs2, 'PaymentReleased', { to: payee2, amount: profit2 });
 
-      const initAmount3 = await balance.current(payee3);
-      const { logs: logs3 } = await this.contract.release(payee3, { gasPrice: 0 });
-      const profit3 = (await balance.current(payee3)).sub(initAmount3);
+      const tracker3 = await balance.tracker(payee3);
+      const { logs: logs3 } = await this.contract.release(payee3);
+      const profit3 = await tracker3.delta();
       expect(profit3).to.be.bignumber.equal(ether('0.70'));
       expectEvent.inLogs(logs3, 'PaymentReleased', { to: payee3, amount: profit3 });
 

Some files were not shown because too many files changed in this diff