Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
⬆️ Upgrade web3 to 4.x-alpha.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Dec 21, 2022
1 parent 6e4a0f5 commit d9d4bd4
Show file tree
Hide file tree
Showing 32 changed files with 8,021 additions and 5,548 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"packages/*/package.json": "node ./scripts/check-truffle-namespace-dependency-versions.js"
},
"resolutions": {
"web3-core": "^4.0.1-alpha.0",
"web3-net": "^4.0.1-alpha.0"
"web3-core": "^4.0.1-alpha.2",
"web3-net": "^4.0.1-alpha.2"
}
}
2 changes: 1 addition & 1 deletion packages/abi-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"change-case": "3.0.2",
"fast-check": "3.1.1",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@fast-check/jest": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/artifactor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"tmp": "^0.2.1",
"ts-node": "10.7.0",
"typescript": "^4.7.4",
"web3": "^4.0.0-alpha.1"
"web3": "^4.0.1-alpha.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/codec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lodash": "^4.17.21",
"semver": "7.3.7",
"utf8": "^3.0.0",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@truffle/contract-schema": "^3.4.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/configstore": "^4.0.0",
"@types/find-up": "^2.1.0",
"@types/lodash": "^4.14.179",
"@types/node": "~18.7.18",
"@types/node": "~18.11.17",
"@types/sinon": "^9.0.10",
"mocha": "10.1.0",
"sinon": "^9.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contract-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ganache": "7.6.0",
"mocha": "10.1.0",
"sinon": "^9.0.2",
"web3": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2"
}
}
6 changes: 3 additions & 3 deletions packages/contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"bignumber.js": "^7.2.1",
"debug": "^4.3.1",
"ethers": "^4.0.32",
"web3": "^4.0.1-alpha.0",
"web3-eth-abi": "^4.0.1-alpha.0",
"web3-utils": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2",
"web3-eth-abi": "^4.0.1-alpha.2",
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"assert": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
"spawn-args": "0.2.0",
"tmp": "^0.2.1",
"universal-analytics": "^0.4.17",
"web3": "^4.0.1-alpha.0",
"web3-utils": "4.0.1-alpha.0",
"web3": "^4.0.1-alpha.2",
"web3-utils": "4.0.1-alpha.2",
"xregexp": "^4.2.4",
"yargs": "^13.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard-message-bus-e2e-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@truffle/dashboard-message-bus-common": "^0.1.5",
"@types/debug": "^4.1.5",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.6",
"@types/node": "^12.12.0",
"ethers": "^5.6.2",
"jest": "29.1.2",
"ts-jest": "29.0.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/db-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"meow": "^9.0.0",
"react": "^16.8.0",
"source-map-support": "^0.5.19",
"web3": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2"
},
"devDependencies": {
"@types/jest": "27.4.1",
Expand All @@ -69,7 +69,7 @@
"typedoc": "0.22.18",
"typescript": "^4.7.4",
"typescript-transform-paths": "3.3.1",
"web3-core": "^4.0.1-alpha.0"
"web3-core": "^4.0.1-alpha.2"
},
"keywords": [
"smart-contract",
Expand Down
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"pouchdb-adapter-memory": "^7.1.1",
"pouchdb-debug": "^7.1.1",
"pouchdb-find": "^7.0.0",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@fast-check/jest": "^1.0.1",
Expand Down Expand Up @@ -81,7 +81,7 @@
"typedoc": "0.22.18",
"typescript": "^4.7.4",
"typescript-transform-paths": "3.3.1",
"web3": "4.0.1-alpha.0"
"web3": "4.0.1-alpha.2"
},
"keywords": [
"database",
Expand Down
4 changes: 2 additions & 2 deletions packages/debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"redux-saga": "1.0.0",
"reselect-tree": "^1.3.7",
"semver": "7.3.7",
"web3": "^4.0.1-alpha.0",
"web3-eth-abi": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2",
"web3-eth-abi": "^4.0.1-alpha.2"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/decoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@truffle/source-map-utils": "^1.3.102",
"bn.js": "^5.1.3",
"debug": "^4.3.1",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@truffle/config": "^1.3.46",
Expand All @@ -49,7 +49,7 @@
"mocha": "10.1.0",
"tmp": "^0.2.1",
"typescript": "^4.7.4",
"web3": "4.0.1-alpha.0"
"web3": "4.0.1-alpha.2"
},
"keywords": [
"abi",
Expand Down
4 changes: 2 additions & 2 deletions packages/deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@truffle/expect": "^0.1.4",
"debug": "^4.3.1",
"eth-ens-namehash": "^2.0.8",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@truffle/config": "^1.3.46",
Expand All @@ -33,7 +33,7 @@
"ganache": "7.6.0",
"mocha": "10.1.0",
"sinon": "^9.0.2",
"web3": "4.0.1-alpha.0"
"web3": "4.0.1-alpha.2"
},
"keywords": [
"contracts",
Expand Down
4 changes: 2 additions & 2 deletions packages/encoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"bn.js": "^5.1.3",
"debug": "^4.3.1",
"lodash": "^4.17.21",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@fast-check/jest": "^1.0.1",
Expand Down Expand Up @@ -64,7 +64,7 @@
"ts-jest": "29.0.3",
"typescript": "^4.7.4",
"utf8": "^3.0.0",
"web3": "4.0.1-alpha.0"
"web3": "4.0.1-alpha.2"
},
"keywords": [
"abi",
Expand Down
2 changes: 1 addition & 1 deletion packages/environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"ganache": "7.6.0",
"node-ipc": "9.2.1",
"source-map-support": "^0.5.19",
"web3": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2"
},
"devDependencies": {
"debug": "^4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@truffle/spinners": "^0.2.3",
"debug": "^4.3.1",
"emittery": "^0.4.1",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
}
}
2 changes: 1 addition & 1 deletion packages/external-compile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@truffle/expect": "^0.1.4",
"debug": "^4.3.1",
"glob": "^7.1.6",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"chai": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/fetch-and-compile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@truffle/source-fetcher": "^1.0.24",
"debug": "^4.3.2",
"semver": "7.3.7",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@truffle/compile-common": "^0.9.1",
Expand Down
6 changes: 2 additions & 4 deletions packages/hdwallet-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
"@metamask/eth-sig-util": "4.0.1",
"@truffle/hdwallet": "^0.1.1",
"@types/ethereum-protocol": "^1.0.0",
"@types/web3": "1.0.20",
"@types/web3-provider-engine": "^14.0.0",
"ethereum-cryptography": "1.1.2",
"ethereum-protocol": "^1.0.1",
"ethereumjs-util": "^7.1.5",
"web3": "1.8.1",
"web3": "4.0.1-alpha.2",
"web3-provider-engine": "16.0.3"
},
"devDependencies": {
Expand All @@ -41,8 +40,7 @@
"ganache": "7.6.0",
"mocha": "10.1.0",
"ts-node": "10.7.0",
"typescript": "^4.7.4",
"web3": "^4.0.1-alpha.0"
"typescript": "^4.7.4"
},
"keywords": [
"ethereum",
Expand Down
4 changes: 2 additions & 2 deletions packages/interface-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"dependencies": {
"bn.js": "^5.1.3",
"ethers": "^4.0.32",
"web3": "^4.0.1-alpha.0",
"web3-utils": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2",
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"sinon": "^9.0.2",
"ts-node": "10.7.0",
"typescript": "^4.7.4",
"web3": "1.8.1"
"web3": "^4.0.1-alpha.2"
},
"keywords": [
"deployment",
Expand Down
2 changes: 1 addition & 1 deletion packages/provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@truffle/error": "^0.1.1",
"@truffle/interface-adapter": "^0.5.25",
"debug": "^4.3.1",
"web3": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2"
},
"devDependencies": {
"ganache": "7.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/require/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"npm-run-all": "^4.1.5",
"ts-node": "10.7.0",
"typescript": "^4.7.4",
"web3": "^4.0.1-alpha.0"
"web3": "^4.0.1-alpha.2"
},
"peerDependencies": {
"ts-node": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"fs-extra": "^9.1.0",
"get-installed-path": "^4.0.8",
"glob": "^7.1.6",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@types/node": "~12.12.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/source-fetcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"axios": "0.27.2",
"debug": "^4.3.1",
"node-abort-controller": "^3.0.1",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@types/async-retry": "^1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/source-map-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"debug": "^4.3.1",
"json-pointer": "^0.6.1",
"node-interval-tree": "^1.3.3",
"web3-utils": "^4.0.1-alpha.0"
"web3-utils": "^4.0.1-alpha.2"
},
"keywords": [
"contracts",
Expand Down
4 changes: 2 additions & 2 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"debug": "^4.3.1",
"mocha": "10.1.0",
"original-require": "^1.0.1",
"web3-utils": "1.8.1"
"web3-utils": "^4.0.1-alpha.2"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/mocha": "^5.2.7",
"ts-node": "10.7.0",
"typescript": "^4.7.4",
"web3": "1.8.1"
"web3": "^4.0.1-alpha.2"
},
"keywords": [
"deployment",
Expand Down
7 changes: 2 additions & 5 deletions packages/test/src/TestRunner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createInterfaceAdapter } from "@truffle/interface-adapter";
import web3Utils from "web3-utils";
import Config from "@truffle/config";
import Migrate from "@truffle/migrate";
import { Resolver } from "@truffle/resolver";
Expand Down Expand Up @@ -121,10 +120,8 @@ export class TestRunner {
}

async startTest() {
const blockNumber = web3Utils.toBN(
await this.interfaceAdapter.getBlockNumber()
);
const one = web3Utils.toBN(1);
const blockNumber = new BN(await this.interfaceAdapter.getBlockNumber());
const one = new BN(1);

// Add one in base 10
this.currentTestStartBlock = blockNumber.add(one);
Expand Down
4 changes: 2 additions & 2 deletions packages/test/src/assertions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import web3Utils from "web3-utils";
import BN from "bn.js";

export default function (chai: any, _utils: any) {
const assert = chai.assert;
Expand All @@ -13,7 +13,7 @@ export default function (chai: any, _utils: any) {
// Controversial: Technically there is that edge case where
// all zeroes could be a valid address. But: This catches all
// those cases where Ethereum returns 0x0000... if something fails.
const number = web3Utils.toBN(this._obj);
const number = new BN(this._obj);
this.assert(
!number.isZero(),
"expected address #{this} to not be zero",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"shebang-loader": "0.0.1",
"stream-buffers": "^3.0.1",
"tmp": "^0.2.1",
"web3": "^4.0.1-alpha.0",
"web3": "^4.0.1-alpha.2",
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.6.1",
"webpack-cli": "^4.10.0",
Expand Down
Loading

0 comments on commit d9d4bd4

Please sign in to comment.