Skip to content

Commit

Permalink
removed openzeppelin test-helper which was causing problems on e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
creotiv committed Oct 8, 2021
1 parent 49b89c6 commit 673e8f2
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 47,132 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
build

package-lock.json
1 change: 0 additions & 1 deletion migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const uniswap = require("../scripts/deployUniswap")
const WETH = require("../scripts/deployWETH")

const deployRegistry = require("../scripts/deployRegistry")
const { web3 } = require("@openzeppelin/test-helpers/src/setup")

module.exports = async function (deployer, network, accounts) {
if (network === 'mumbai' || network === 'goerli') {
Expand Down
2 changes: 1 addition & 1 deletion migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')

const MystToken = artifacts.require("MystToken")
const Registry = artifacts.require("Registry")
Expand Down
47,112 changes: 0 additions & 47,112 deletions package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@ethersproject/providers": "^5.3.0",
"@ethersproject/solidity": "^5.3.0",
"@openzeppelin/contracts": "4.1.0",
"@openzeppelin/test-helpers": "^0.5.11",
"@truffle/hdwallet-provider": "1.2.6",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
Expand All @@ -39,6 +38,7 @@
"lodash": "^4.17.21",
"secp256k1": "^4.0.2",
"truffle": "^5.4.13",
"truffle-flattener": "^1.5.0"
"truffle-flattener": "^1.5.0",
"web3-utils": "^1.6.0"
}
}
2 changes: 1 addition & 1 deletion test/beneficiary.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Tested functions can be found in smart-contract code at `contracts/HermesImplementation.sol`.
*/

const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
generateChannelId,
topUpTokens,
Expand Down
2 changes: 1 addition & 1 deletion test/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Smart-contract code can be found in `contracts/ChannelImplementation.sol`.
*/

const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
topUpTokens,
topUpEthers,
Expand Down
2 changes: 1 addition & 1 deletion test/fastWithdrawal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Smart-contract code can be found in `contracts/ChannelImplementation.sol`.
*/

const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
topUpTokens,
topUpEthers,
Expand Down
2 changes: 1 addition & 1 deletion test/fundsRecovery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
deriveContractAddress,
topUpEthers,
Expand Down
2 changes: 1 addition & 1 deletion test/fundsRecoveryByCheque.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
genCreate2Address,
signMessage,
Expand Down
2 changes: 1 addition & 1 deletion test/greenpaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
on-chain and off-chain interactions from registering identity, to settlement of received funds
*/

const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
topUpTokens,
topUpEthers,
Expand Down
2 changes: 1 addition & 1 deletion test/hermes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Smart-contract code can be found in `contracts/HermesImplementation.sol`.
*/

const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
generateChannelId,
topUpTokens,
Expand Down
5 changes: 3 additions & 2 deletions test/hermesChannelSettlement.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Tested functions can be found in smart-contract code at `contracts/HermesImplementation.sol`.
*/

const { BN } = require('@openzeppelin/test-helpers')
const { randomBytes } = require('crypto')
// const {BN} = require('web3-utils')
const {BN} = require('web3-utils');
// const { randomBytes } = require('crypto')
const {
generateChannelId,
topUpTokens,
Expand Down
2 changes: 1 addition & 1 deletion test/hermesClosing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai')
.use(require('chai-as-promised'))
.should()
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')

const { topUpTokens, setupDEX } = require('./utils/index.js')
const {
Expand Down
2 changes: 1 addition & 1 deletion test/hermesFee.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai')
.use(require('chai-as-promised'))
.should()
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const { randomBytes } = require('crypto')
const { topUpTokens, generateChannelId, keccak, setupDEX } = require('./utils/index.js')
const {
Expand Down
2 changes: 1 addition & 1 deletion test/hermesPayAndSettle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const chai = require('chai')
chai.use(require('chai-as-promised'))
chai.use(require('chai-bn')(BN))
Expand Down
2 changes: 1 addition & 1 deletion test/hermesStakeAndPunishment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai')
.use(require('chai-as-promised'))
.should()
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const { randomBytes } = require('crypto')

const { topUpTokens, setupDEX, generateChannelId, keccak } = require('./utils/index.js')
Expand Down
2 changes: 1 addition & 1 deletion test/multiHermes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai')
.use(require('chai-as-promised'))
.should()
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const { topUpTokens, setupDEX } = require('./utils/index.js')
const { signIdentityRegistration } = require('./utils/client.js')
const wallet = require('./utils/wallet.js')
Expand Down
2 changes: 1 addition & 1 deletion test/registry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai')
.use(require('chai-as-promised'))
.should()
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')

const genCreate2Address = require('./utils/index.js').genCreate2Address
const topUpTokens = require('./utils/index.js').topUpTokens
Expand Down
2 changes: 1 addition & 1 deletion test/utils/wallet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EthereumTx = require('ethereumjs-tx')
const { BN } = require('@openzeppelin/test-helpers')
const {BN} = require('web3-utils')
const {
generatePrivateKey,
privateToPublic,
Expand Down

0 comments on commit 673e8f2

Please sign in to comment.