diff --git a/packages/artifactor/package.json b/packages/artifactor/package.json index da80241c442..18562ffa916 100644 --- a/packages/artifactor/package.json +++ b/packages/artifactor/package.json @@ -29,7 +29,7 @@ "temp": "^0.8.3", "ts-node": "^8.3.0", "typescript": "^3.6.3", - "web3": "1.2.1" + "web3": "1.2.2" }, "publishConfig": { "access": "public" diff --git a/packages/artifactor/tsconfig.json b/packages/artifactor/tsconfig.json index 2e6f32ec95b..ed2564c5f92 100644 --- a/packages/artifactor/tsconfig.json +++ b/packages/artifactor/tsconfig.json @@ -9,12 +9,7 @@ "outDir": "dist", "baseUrl": ".", "lib": ["es2017"], - "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" - ] - }, + "paths": {}, "rootDir": ".", "typeRoots": [ "./typings", diff --git a/packages/blockchain-utils/index.ts b/packages/blockchain-utils/index.ts index 263dbdedcfe..5bf7f60bd00 100644 --- a/packages/blockchain-utils/index.ts +++ b/packages/blockchain-utils/index.ts @@ -1,8 +1,12 @@ -import { Provider, Callback, JsonRPCResponse } from "web3/providers" -import { parsedUriObject } from "typings" +import { parsedUriObject } from "typings"; +import { Callback, JsonRpcResponse, Provider } from "@truffle/provider"; const Blockchain = { - getBlockByNumber(blockNumber: string, provider: Provider, callback: Callback) { + getBlockByNumber( + blockNumber: string, + provider: Provider, + callback: Callback + ) { const params = [blockNumber, true]; provider.send( { @@ -15,7 +19,11 @@ const Blockchain = { ); }, - getBlockByHash(blockHash: string, provider: Provider, callback: Callback) { + getBlockByHash( + blockHash: string, + provider: Provider, + callback: Callback + ) { const params = [blockHash, true]; provider.send( { @@ -45,20 +53,28 @@ const Blockchain = { asURI(provider: Provider, callback: Callback) { let genesis: any, latest; - this.getBlockByNumber("0x0", provider, (err: Error, { result } : JsonRPCResponse) => { - if (err) return callback(err); - genesis = result; - - this.getBlockByNumber("latest", provider, (err: Error, { result } : JsonRPCResponse) => { + this.getBlockByNumber( + "0x0", + provider, + (err: Error, { result }: JsonRpcResponse) => { if (err) return callback(err); - latest = result; - const url = `blockchain://${genesis.hash.replace( - "0x", - "" - )}/block/${latest.hash.replace("0x", "")}`; - callback(null, url); - }); - }); + genesis = result; + + this.getBlockByNumber( + "latest", + provider, + (err: Error, { result }: JsonRpcResponse) => { + if (err) return callback(err); + latest = result; + const url = `blockchain://${genesis.hash.replace( + "0x", + "" + )}/block/${latest.hash.replace("0x", "")}`; + callback(null, url); + } + ); + } + ); }, matches(uri: string, provider: Provider, callback: Callback) { @@ -67,22 +83,30 @@ const Blockchain = { const expected_genesis = parsedUri.genesis_hash; const expected_block = parsedUri.block_hash; - this.getBlockByNumber("0x0", provider, (err: Error, { result } : JsonRPCResponse) => { - if (err) return callback(err); - const block = result; - if (block.hash !== expected_genesis) return callback(null, false); - - this.getBlockByHash(expected_block, provider, (err: Error, { result } : JsonRPCResponse) => { - // Treat an error as if the block didn't exist. This is because - // some clients respond differently. + this.getBlockByNumber( + "0x0", + provider, + (err: Error, { result }: JsonRpcResponse) => { + if (err) return callback(err); const block = result; - if (err || block == null) { - return callback(null, false); - } - - callback(null, true); - }); - }); + if (block.hash !== expected_genesis) return callback(null, false); + + this.getBlockByHash( + expected_block, + provider, + (err: Error, { result }: JsonRpcResponse) => { + // Treat an error as if the block didn't exist. This is because + // some clients respond differently. + const block = result; + if (err || block == null) { + return callback(null, false); + } + + callback(null, true); + } + ); + } + ); } }; diff --git a/packages/blockchain-utils/package.json b/packages/blockchain-utils/package.json index 76f37155698..c1503ad4fb6 100644 --- a/packages/blockchain-utils/package.json +++ b/packages/blockchain-utils/package.json @@ -18,7 +18,7 @@ "types": "./typings/index.d.ts", "devDependencies": { "@types/assert": "^1.4.2", - "@types/web3": "^1.0.19", + "@types/node": "^12.12.5", "mocha": "5.2.0", "ts-node": "^8.3.0", "typescript": "^3.6.3" @@ -30,5 +30,8 @@ ], "publishConfig": { "access": "public" + }, + "dependencies": { + "@truffle/provider": "^0.2.0" } } diff --git a/packages/blockchain-utils/tsconfig.json b/packages/blockchain-utils/tsconfig.json index 87c41c6322f..076bfc7bb54 100644 --- a/packages/blockchain-utils/tsconfig.json +++ b/packages/blockchain-utils/tsconfig.json @@ -10,16 +10,15 @@ "baseUrl": ".", "lib": ["es2017"], "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" + "net": [ + "../../node_modules/@types/node", + "node_modules/@types/node" ] }, "rootDir": ".", "typeRoots": [ "./typings", "../../**/node_modules/@types/mocha", - "../../**/node_modules/@types/web3", "../../**/node_modules/@types/assert" ] }, diff --git a/packages/box/tsconfig.json b/packages/box/tsconfig.json index 970fcc942b4..7d5595e7e8a 100644 --- a/packages/box/tsconfig.json +++ b/packages/box/tsconfig.json @@ -9,12 +9,7 @@ "outDir": "dist", "baseUrl": ".", "lib": ["es2017"], - "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" - ] - }, + "paths": {}, "rootDir": ".", "typeRoots": [ "./typings", diff --git a/packages/code-utils/tsconfig.json b/packages/code-utils/tsconfig.json index ec120004e50..39bed34563f 100644 --- a/packages/code-utils/tsconfig.json +++ b/packages/code-utils/tsconfig.json @@ -9,12 +9,7 @@ "outDir": "dist", "baseUrl": ".", "lib": ["es2017"], - "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" - ] - }, + "paths": {}, "rootDir": ".", "typeRoots": [ "./typings", diff --git a/packages/contract/package.json b/packages/contract/package.json index 157eac7bd5c..1bc1659b40b 100644 --- a/packages/contract/package.json +++ b/packages/contract/package.json @@ -26,10 +26,10 @@ "@truffle/interface-adapter": "^0.3.1", "bignumber.js": "^7.2.1", "ethers": "^4.0.0-beta.1", - "web3": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-utils": "1.2.1" + "web3": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-utils": "1.2.2" }, "devDependencies": { "@truffle/compile-solidity": "^4.2.10", diff --git a/packages/core/package.json b/packages/core/package.json index 93451726df6..10164566353 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -62,7 +62,7 @@ "spawn-args": "^0.1.0", "temp": "^0.8.3", "universal-analytics": "^0.4.17", - "web3": "1.2.1", + "web3": "1.2.2", "xregexp": "^4.2.4", "yargs": "^8.0.2" }, diff --git a/packages/debugger/package.json b/packages/debugger/package.json index f596d3ae828..9d8bdf5a6d0 100644 --- a/packages/debugger/package.json +++ b/packages/debugger/package.json @@ -34,8 +34,8 @@ "redux-saga": "1.0.0", "remote-redux-devtools": "^0.5.12", "reselect-tree": "^1.3.1", - "web3": "1.2.1", - "web3-eth-abi": "1.2.1" + "web3": "1.2.2", + "web3-eth-abi": "1.2.2" }, "devDependencies": { "@truffle/artifactor": "^4.0.37", diff --git a/packages/decode-utils/package.json b/packages/decode-utils/package.json index d33fe9b2ee2..b012e754ed6 100644 --- a/packages/decode-utils/package.json +++ b/packages/decode-utils/package.json @@ -21,14 +21,13 @@ "bn.js": "^4.11.8", "lodash.clonedeep": "^4.5.0", "lodash.escaperegexp": "^4.1.2", - "web3": "1.2.1", + "web3": "1.2.2", "web3-eth-abi": "1.0.0-beta.52" }, "devDependencies": { "@types/bn.js": "^4.11.2", "@types/lodash.clonedeep": "^4.5.4", "@types/lodash.escaperegexp": "^4.1.6", - "@types/web3": "^1.0.5", "typescript": "^3.1.3" }, "publishConfig": { diff --git a/packages/decode-utils/tsconfig.json b/packages/decode-utils/tsconfig.json index 5069926d594..e468310fe93 100644 --- a/packages/decode-utils/tsconfig.json +++ b/packages/decode-utils/tsconfig.json @@ -9,12 +9,7 @@ "outDir": "dist", "baseUrl": ".", "lib": ["es2017"], - "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" - ] - }, + "paths": {}, "rootDir": "src", "typeRoots": [ "../../**/node_modules/@types/bn.js", diff --git a/packages/decoder/lib/interface/contract-decoder.ts b/packages/decoder/lib/interface/contract-decoder.ts index 6de3ce38b9e..1edc1c409ee 100644 --- a/packages/decoder/lib/interface/contract-decoder.ts +++ b/packages/decoder/lib/interface/contract-decoder.ts @@ -29,12 +29,13 @@ import { AstDefinition, AstReferences } from "@truffle/decode-utils"; -import { BlockType, Transaction } from "web3/eth/types"; -import { EventLog, Log } from "web3/types"; -import { Provider } from "web3/providers"; +import { Transaction, EventLog, Log } from "web3-core"; +import { Provider } from "@truffle/provider"; import abiDecoder from "abi-decoder"; import isEqual from "lodash.isequal"; //util.isDeepStrictEqual doesn't exist in Node 8 +type BlockType = number | string; + export interface EvmMapping { name: string; type: string; @@ -373,6 +374,7 @@ export default class TruffleContractDecoder extends AsyncEventEmitter { } //otherwise, get it, cache it, and return it let word = DecodeUtils.Conversion.toBytes( + // @ts-ignore await this.web3.eth.getStorageAt(address, slot, block), DecodeUtils.EVM.WORD_SIZE ); @@ -502,6 +504,7 @@ export default class TruffleContractDecoder extends AsyncEventEmitter { block: BlockType = "latest" ): Promise { const web3Contract = new this.web3.eth.Contract( + // @ts-ignore this.contract.abi, this.contractAddress ); diff --git a/packages/decoder/lib/interface/index.ts b/packages/decoder/lib/interface/index.ts index 827dc8c704c..07d83eb784e 100644 --- a/packages/decoder/lib/interface/index.ts +++ b/packages/decoder/lib/interface/index.ts @@ -4,7 +4,7 @@ import { EvmInfo } from "../types/evm"; import decode from "../decode"; import TruffleDecoder from "./contract-decoder"; import { ContractObject } from "@truffle/contract-schema/spec"; -import { Provider } from "web3/providers"; +import { Provider } from "@truffle/provider"; import { DecoderRequest } from "../types/request"; export { getStorageAllocations, storageSize } from "../allocate/storage"; @@ -13,10 +13,19 @@ export { getMemoryAllocations } from "../allocate/memory"; export { readStack } from "../read/stack"; export { slotAddress } from "../read/storage"; -export function forContract(contract: ContractObject, relevantContracts: ContractObject[], provider: Provider, address?: string): TruffleDecoder { +export function forContract( + contract: ContractObject, + relevantContracts: ContractObject[], + provider: Provider, + address?: string +): TruffleDecoder { return new TruffleDecoder(contract, relevantContracts, provider, address); } -export function* forEvmState(definition: AstDefinition, pointer: DataPointer, info: EvmInfo): IterableIterator { +export function* forEvmState( + definition: AstDefinition, + pointer: DataPointer, + info: EvmInfo +): IterableIterator { return yield* decode(definition, pointer, info); } diff --git a/packages/decoder/package.json b/packages/decoder/package.json index fbd1d38d2a1..7be9aba5ceb 100644 --- a/packages/decoder/package.json +++ b/packages/decoder/package.json @@ -22,6 +22,7 @@ "types": "lib/interface/index.ts", "dependencies": { "@truffle/decode-utils": "^1.0.18", + "@truffle/provider": "^0.2.0", "abi-decoder": "^1.2.0", "async-eventemitter": "^0.2.4", "bn.js": "^4.11.8", @@ -30,7 +31,7 @@ "lodash.isequal": "^4.5.0", "lodash.merge": "^4.6.1", "utf8": "^3.0.0", - "web3": "1.2.1" + "web3": "1.2.2" }, "peerDependencies": { "truffle": "^5.0.14" @@ -47,7 +48,6 @@ "@types/lodash.isequal": "^4.5.4", "@types/lodash.merge": "^4.6.4", "@types/utf8": "^2.1.6", - "@types/web3": "^1.0.5", "json-schema-to-typescript": "^5.5.0", "typescript": "^3.6.3" }, diff --git a/packages/decoder/tsconfig.json b/packages/decoder/tsconfig.json index 96689f93307..c51a5ac074b 100644 --- a/packages/decoder/tsconfig.json +++ b/packages/decoder/tsconfig.json @@ -10,9 +10,10 @@ "baseUrl": ".", "lib": ["es2017"], "paths": { - "web3": ["../../node_modules/@types/web3/index", "node_modules/web3/index"], - "web3/types": ["../../node_modules/@types/web3/types", "node_modules/web3/types"], - "web3/eth/types": ["../../node_modules/@types/web3/eth/types", "node_modules/web3/eth/types"] + "web3-core": [ + "../../node_modules/web3/node_modules/web3-core/types", + "node_modules/web3/node_modules/web3-core/types" + ] }, "rootDir": "lib", "typeRoots": [ @@ -22,7 +23,8 @@ "../../**/node_modules/@types/lodash", "../../**/node_modules/@types/lodash.clonedeep", "../../**/node_modules/@types/lodash.isequal", - "../../**/node_modules/@types/lodash.merge" + "../../**/node_modules/@types/lodash.merge", + "../../node_modules/@truffle/provider/typings" ] }, diff --git a/packages/deployer/package.json b/packages/deployer/package.json index ebb4e6bc0d9..6d6385ff056 100644 --- a/packages/deployer/package.json +++ b/packages/deployer/package.json @@ -23,7 +23,7 @@ "@truffle/workflow-compile": "^2.1.11", "ganache-core": "2.7.0", "mocha": "5.2.0", - "web3": "1.2.1" + "web3": "1.2.2" }, "keywords": [ "contracts", diff --git a/packages/environment/package.json b/packages/environment/package.json index 9d4621c9ece..fb4b3555b42 100644 --- a/packages/environment/package.json +++ b/packages/environment/package.json @@ -19,7 +19,7 @@ "@truffle/resolver": "^5.0.19", "ganache-core": "2.7.0", "node-ipc": "^9.1.1", - "web3": "1.2.1" + "web3": "1.2.2" }, "devDependencies": { "debug": "^4.1.0" diff --git a/packages/external-compile/package.json b/packages/external-compile/package.json index 0ea71240b5a..86ab3854efb 100644 --- a/packages/external-compile/package.json +++ b/packages/external-compile/package.json @@ -18,7 +18,7 @@ "@truffle/expect": "^0.0.12", "debug": "^4.1.0", "glob": "^7.1.2", - "web3-utils": "1.2.1" + "web3-utils": "1.2.2" }, "devDependencies": { "chai": "4.2.0", diff --git a/packages/hdwallet-provider/package.json b/packages/hdwallet-provider/package.json index d5b4889b3a5..950381f0c2a 100644 --- a/packages/hdwallet-provider/package.json +++ b/packages/hdwallet-provider/package.json @@ -17,6 +17,7 @@ "test": "yarn build && mocha --exit -r ts-node/register test/**/*.test.ts" }, "dependencies": { + "@truffle/provider": "^0.2.0", "any-promise": "^1.3.0", "bindings": "^1.5.0", "bip39": "^2.4.2", @@ -24,7 +25,7 @@ "ethereumjs-tx": "^1.0.0", "ethereumjs-util": "^6.1.0", "ethereumjs-wallet": "^0.6.3", - "web3": "1.2.1", + "web3": "1.2.2", "web3-provider-engine": "https://github.com/trufflesuite/provider-engine#web3-one" }, "devDependencies": { diff --git a/packages/hdwallet-provider/src/index.ts b/packages/hdwallet-provider/src/index.ts index b55b1f34d74..ae962ac352e 100644 --- a/packages/hdwallet-provider/src/index.ts +++ b/packages/hdwallet-provider/src/index.ts @@ -11,7 +11,7 @@ import ProviderSubprovider from "web3-provider-engine/subproviders/provider"; import Url from "url"; import Web3 from "web3"; import { JSONRPCRequestPayload, JSONRPCErrorCallback } from "ethereum-protocol"; -import { Callback, JsonRPCResponse } from "web3/providers"; +import { Callback, JsonRpcResponse } from "@truffle/provider"; // Important: do not use debug module. Reason: https://github.com/trufflesuite/truffle/issues/2374#issuecomment-536109086 @@ -175,14 +175,14 @@ class HDWalletProvider { public send( payload: JSONRPCRequestPayload, - callback: JSONRPCErrorCallback | Callback + callback: JSONRPCErrorCallback | Callback ): void { return this.engine.send.call(this.engine, payload, callback); } public sendAsync( payload: JSONRPCRequestPayload, - callback: JSONRPCErrorCallback | Callback + callback: JSONRPCErrorCallback | Callback ): void { this.engine.sendAsync.call(this.engine, payload, callback); } diff --git a/packages/hdwallet-provider/test/provider.test.ts b/packages/hdwallet-provider/test/provider.test.ts index 059ec40bfd8..30917b0cf83 100644 --- a/packages/hdwallet-provider/test/provider.test.ts +++ b/packages/hdwallet-provider/test/provider.test.ts @@ -1,11 +1,12 @@ -import assert from 'assert'; -import Ganache from 'ganache-core'; -import * as EthUtil from 'ethereumjs-util'; -import Web3 from 'web3'; -import WalletProvider from '../dist'; -import { describe, it } from 'mocha'; - -describe("HD Wallet Provider", function () { +import assert from "assert"; +import Ganache from "ganache-core"; +import * as EthUtil from "ethereumjs-util"; +import Web3 from "web3"; +import WalletProvider from "../dist"; +import { describe, it } from "mocha"; + +describe("HD Wallet Provider", function() { + // @ts-ignore const web3 = new Web3(); const port = 8545; let server: any; @@ -21,11 +22,11 @@ describe("HD Wallet Provider", function () { }); afterEach(() => { - web3.setProvider(new Web3.providers.HttpProvider('ws://localhost:8545')); + web3.setProvider(new Web3.providers.HttpProvider("ws://localhost:8545")); provider.engine.stop(); }); - it("provides for a mnemonic", function (done) { + it("provides for a mnemonic", function(done) { const truffleDevAccounts = [ "0x627306090abab3a6e1400e9345bc60c78a8bef57", "0xf17f52151ebef6c7334fad080c5704d77216b732", @@ -46,13 +47,13 @@ describe("HD Wallet Provider", function () { assert.deepEqual(provider.getAddresses(), truffleDevAccounts); web3.setProvider(provider); - web3.eth.getBlockNumber((err, number) => { + web3.eth.getBlockNumber((err: Error, number: number) => { assert(number === 0); done(); }); }); - it("throws on invalid mnemonic", function (done) { + it("throws on invalid mnemonic", function(done) { try { provider = new WalletProvider( "takoyaki is delicious", @@ -67,7 +68,7 @@ describe("HD Wallet Provider", function () { } }); - it("provides for a private key", function (done) { + it("provides for a private key", function(done) { const privateKey = "3f841bf589fdf83a521e55d51afddc34fa65351161eead24f064855fc29c9580"; //random valid private key generated with ethkey provider = new WalletProvider(privateKey, `http://localhost:${port}`); @@ -79,13 +80,13 @@ describe("HD Wallet Provider", function () { assert(EthUtil.isValidAddress(address), "invalid address"); }); - web3.eth.getBlockNumber((err, number) => { + web3.eth.getBlockNumber((err: Error, number: number) => { assert(number === 0); done(); }); }); - it("provides for an array of private keys", function (done) { + it("provides for an array of private keys", function(done) { const privateKeys = [ "3f841bf589fdf83a521e55d51afddc34fa65351161eead24f064855fc29c9580", "9549f39decea7b7504e15572b2c6a72766df0281cea22bd1a3bc87166b1ca290" @@ -125,7 +126,7 @@ describe("HD Wallet Provider", function () { ); }); - web3.eth.getBlockNumber((err, number) => { + web3.eth.getBlockNumber((err: Error, number: number) => { assert(number === 0); done(); }); diff --git a/packages/hdwallet-provider/tsconfig.json b/packages/hdwallet-provider/tsconfig.json index 64d35341c1b..8e28a59e3d9 100644 --- a/packages/hdwallet-provider/tsconfig.json +++ b/packages/hdwallet-provider/tsconfig.json @@ -18,8 +18,8 @@ ] }, "typeRoots": [ - "./typings", - "../../**/node_modules/@types/mocha" + "../../node_modules/@types/mocha", + "../../node_modules/@truffle/provider/typings" ] }, "include": [ diff --git a/packages/hdwallet-provider/typings/web3-provider-engine/index.d.ts b/packages/hdwallet-provider/typings/web3-provider-engine/index.d.ts index 351578a2eb0..20129bc7fc9 100644 --- a/packages/hdwallet-provider/typings/web3-provider-engine/index.d.ts +++ b/packages/hdwallet-provider/typings/web3-provider-engine/index.d.ts @@ -3,7 +3,7 @@ import { JSONRPCRequestPayload, JSONRPCErrorCallback } from "ethereum-protocol"; -import { Callback, JsonRPCResponse } from "web3/providers"; +import { Callback, JsonRpcResponse } from "@truffle/provider"; interface Web3ProviderEngineOptions { pollingInterval?: number; @@ -15,11 +15,11 @@ declare class Web3ProviderEngine implements Provider { on(event: string, handler: () => void): void; send( payload: JSONRPCRequestPayload, - callback?: JSONRPCErrorCallback | Callback + callback?: JSONRPCErrorCallback | Callback ): void; sendAsync( payload: JSONRPCRequestPayload, - callback: JSONRPCErrorCallback | Callback + callback: JSONRPCErrorCallback | Callback ): void; addProvider(provider: any): void; // start block polling diff --git a/packages/interface-adapter/lib/ethereum-overloads.ts b/packages/interface-adapter/lib/ethereum-overloads.ts index f2adf65d382..7ae7a8bb4c7 100644 --- a/packages/interface-adapter/lib/ethereum-overloads.ts +++ b/packages/interface-adapter/lib/ethereum-overloads.ts @@ -1,6 +1,6 @@ import BN from "bn.js"; import { Web3Shim } from "./web3-shim"; -import { BlockType } from "web3/eth/types"; +import { EvmBlockType } from "./interface-adapter"; export const EthereumDefinition = { async initNetworkType(web3: Web3Shim) { @@ -21,7 +21,7 @@ const overrides = { const _oldFormatter = web3.eth.getBlock.method.outputFormatter; // @ts-ignore - web3.eth.getBlock.method.outputFormatter = (block: BlockType) => { + web3.eth.getBlock.method.outputFormatter = (block: EvmBlockType) => { // @ts-ignore let result = _oldFormatter.call(web3.eth.getBlock.method, block); diff --git a/packages/interface-adapter/lib/interface-adapter.ts b/packages/interface-adapter/lib/interface-adapter.ts index b48182d3d71..728936fd89d 100644 --- a/packages/interface-adapter/lib/interface-adapter.ts +++ b/packages/interface-adapter/lib/interface-adapter.ts @@ -2,11 +2,11 @@ import { Web3InterfaceAdapter, Web3InterfaceAdapterOptions } from "./web3-interface-adapter"; -import { Block as EvmBlock } from "web3/eth/types"; -import { BlockType as EvmBlockType } from "web3/eth/types"; -import { Provider } from "web3/providers"; +import { Block as EvmBlock } from "web3-eth"; +import { Provider } from "@truffle/provider"; export interface InterfaceAdapterOptions extends Web3InterfaceAdapterOptions {} +export type EvmBlockType = number | string; export type NetworkId = Number | String; export type Block = EvmBlock | any; export type BlockType = EvmBlockType | any; diff --git a/packages/interface-adapter/lib/web3-interface-adapter.ts b/packages/interface-adapter/lib/web3-interface-adapter.ts index 309009ff63c..e0d8044e872 100644 --- a/packages/interface-adapter/lib/web3-interface-adapter.ts +++ b/packages/interface-adapter/lib/web3-interface-adapter.ts @@ -1,6 +1,6 @@ import { Web3Shim, Web3ShimOptions } from "./web3-shim"; -import { BlockType } from "web3/eth/types"; -import { Provider } from "web3/providers"; +import { EvmBlockType } from "./interface-adapter"; +import { Provider } from "@truffle/provider"; export interface Web3InterfaceAdapterOptions extends Web3ShimOptions {} @@ -14,7 +14,7 @@ export class Web3InterfaceAdapter { return this.web3.eth.net.getId(); } - public getBlock(block: BlockType) { + public getBlock(block: EvmBlockType) { return this.web3.eth.getBlock(block); } diff --git a/packages/interface-adapter/lib/web3-shim.ts b/packages/interface-adapter/lib/web3-shim.ts index d450fce2af9..f41d3a3d547 100644 --- a/packages/interface-adapter/lib/web3-shim.ts +++ b/packages/interface-adapter/lib/web3-shim.ts @@ -1,5 +1,5 @@ import Web3 from "web3"; -import { Provider } from "web3/providers"; +import { Provider } from "@truffle/provider"; import { EthereumDefinition } from "./ethereum-overloads"; import { QuorumDefinition } from "./quorum-overloads"; @@ -59,6 +59,7 @@ export class Web3Shim extends Web3 { public networkType: NetworkType; constructor(options?: Web3ShimOptions) { + // @ts-ignore super(); if (options) { diff --git a/packages/interface-adapter/package.json b/packages/interface-adapter/package.json index 4653ffa7543..623c01fa11f 100644 --- a/packages/interface-adapter/package.json +++ b/packages/interface-adapter/package.json @@ -22,13 +22,12 @@ "bn.js": "^4.11.8", "ethers": "^4.0.32", "lodash": "^4.17.13", - "web3": "1.2.1" + "web3": "1.2.2" }, "devDependencies": { "@types/bn.js": "^4.11.4", "@types/lodash": "^4.14.136", "@types/mocha": "^5.2.6", - "@types/web3": "^1.0.18", "ganache-core": "2.8.0", "mocha": "^6.0.2", "ts-node": "^8.0.3", diff --git a/packages/interface-adapter/tsconfig.json b/packages/interface-adapter/tsconfig.json index 0b072aaaa81..1daf1bf0971 100644 --- a/packages/interface-adapter/tsconfig.json +++ b/packages/interface-adapter/tsconfig.json @@ -10,15 +10,16 @@ "baseUrl": ".", "lib": ["es2017"], "paths": { - "web3": [ - "../../node_modules/@types/web3/index", - "node_modules/web3/index" + "web3-eth": [ + "../../node_modules/web3/node_modules/web3-eth/types", + "node_modules/web3/node_modules/web3-eth/types" ] }, "rootDir": "lib", "typeRoots": [ - "../../**/node_modules/@types/bn.js", - "../../**/node_modules/@types/mocha" + "../../node_modules/@types/bn.js", + "../../node_modules/@types/mocha", + "../../node_modules/@truffle/provider/typings" ] }, "include": [ diff --git a/packages/migrate/index.js b/packages/migrate/index.js index 93d513b90dc..031e723da73 100644 --- a/packages/migrate/index.js +++ b/packages/migrate/index.js @@ -40,7 +40,9 @@ const Migrate = { let migrations = files .filter(file => isNaN(parseInt(path.basename(file))) === false) .filter( - file => path.extname(file).match(config.migrations_file_extension_regexp) != null + file => + path.extname(file).match(config.migrations_file_extension_regexp) != + null ) .map(file => new Migration(file, Migrate.reporter, config)); diff --git a/packages/migrate/package.json b/packages/migrate/package.json index c86998bc2bc..365add4795c 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -23,7 +23,7 @@ "async": "2.6.1", "emittery": "^0.4.0", "node-dir": "0.1.17", - "web3": "1.2.1" + "web3": "1.2.2" }, "devDependencies": { "mocha": "5.2.0", diff --git a/packages/provider/package.json b/packages/provider/package.json index 4611b7a2f43..b113c46d670 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -10,17 +10,21 @@ }, "version": "0.2.0", "main": "index.js", + "types": "./typings/index.d.ts", "scripts": { "test": "mocha" }, "dependencies": { "@truffle/error": "^0.0.7", "@truffle/interface-adapter": "^0.3.1", - "web3": "1.2.1" + "web3": "1.2.2" }, "devDependencies": { "ganache-core": "2.7.0", - "mocha": "5.2.0" + "mocha": "5.2.0", + "web3-providers-http": "1.2.2", + "web3-providers-ipc": "1.2.2", + "web3-providers-ws": "1.2.2" }, "keywords": [ "ethereum", diff --git a/packages/provider/typings/index.d.ts b/packages/provider/typings/index.d.ts new file mode 100644 index 00000000000..3f1affca6c0 --- /dev/null +++ b/packages/provider/typings/index.d.ts @@ -0,0 +1,17 @@ +import { HttpProvider } from "web3-providers-http"; +import { IpcProvider } from "web3-providers-ipc"; +import { WebsocketProvider } from "web3-providers-ws"; + +export type Provider = HttpProvider | IpcProvider | WebsocketProvider; + +export interface JsonRpcResponse { + jsonrpc: string; + id: number; + result?: any; + error?: string; +} + +export interface Callback { + (error: Error): void; + (error: null, val: ResultType): void; +} diff --git a/packages/reporters/package.json b/packages/reporters/package.json index 1677d691a41..14a7aeac14b 100644 --- a/packages/reporters/package.json +++ b/packages/reporters/package.json @@ -10,7 +10,7 @@ "dependencies": { "node-emoji": "^1.8.1", "ora": "^3.0.0", - "web3-utils": "1.2.1" + "web3-utils": "1.2.2" }, "publishConfig": { "access": "public" diff --git a/packages/require/package.json b/packages/require/package.json index d4858d85ace..137e7bd4a79 100644 --- a/packages/require/package.json +++ b/packages/require/package.json @@ -18,7 +18,7 @@ "@truffle/expect": "^0.0.12", "@truffle/interface-adapter": "^0.3.1", "original-require": "1.0.1", - "web3": "1.2.1" + "web3": "1.2.2" }, "devDependencies": { "mocha": "5.2.0" diff --git a/packages/truffle/package.json b/packages/truffle/package.json index 4fd8712bf23..cea5e563e1d 100644 --- a/packages/truffle/package.json +++ b/packages/truffle/package.json @@ -53,7 +53,7 @@ "shebang-loader": "0.0.1", "stream-buffers": "^3.0.1", "tmp": "0.0.33", - "web3": "1.2.1", + "web3": "1.2.2", "webpack": "^2.5.1", "webpack-bundle-analyzer": "^3.0.3", "yargs": "^8.0.2" diff --git a/yarn.lock b/yarn.lock index 448e81df189..73d54cfa9dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1200,6 +1200,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.21.tgz#4a9db7ef1d1671c0015e632c5fa3d46c86c58c1e" integrity sha512-nuFlRdBiqbF+PJIEVxm2jLFcQWN7q7iWEJGsBV4n7v1dbI9qXB8im2pMMKMCUZe092sQb5SQft2DHfuQGK5hqQ== +"@types/node@^12.12.5": + version "12.12.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.5.tgz#66103d2eddc543d44a04394abb7be52506d7f290" + integrity sha512-KEjODidV4XYUlJBF3XdjSH5FWoMCtO0utnhtdLf1AgeuZLOrRbvmU/gaRCVg7ZaQDjVf3l84egiY0mRNe5xE4A== + +"@types/node@^12.6.1": + version "12.11.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a" + integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA== + "@types/prettier@^1.13.2": version "1.18.3" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.18.3.tgz#64ff53329ce16139f17c3db9d3e0487199972cd8" @@ -1244,11 +1254,6 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d" integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg== -"@types/underscore@*": - version "1.9.3" - resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.9.3.tgz#d7d9dc5a5ff76fa3d001b29bc7cc95ab0ccfe85e" - integrity sha512-SwbHKB2DPIDlvYqtK5O+0LFtZAyrUSw4c0q+HWwmH1Ve3KMQ0/5PlV3RX97+3dP7yMrnNQ8/bCWWvQpPl03Mug== - "@types/utf8@^2.1.6": version "2.1.6" resolved "https://registry.yarnpkg.com/@types/utf8/-/utf8-2.1.6.tgz#430cabb71a42d0a3613cce5621324fe4f5a25753" @@ -1261,14 +1266,6 @@ dependencies: "@types/ethereum-protocol" "*" -"@types/web3@^1.0.18", "@types/web3@^1.0.19", "@types/web3@^1.0.5": - version "1.0.20" - resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.20.tgz#234dd1f976702c0daaff147c80f24a5582e09d0e" - integrity sha512-KTDlFuYjzCUlBDGt35Ir5QRtyV9klF84MMKUsEJK10sTWga/71V+8VYLT7yysjuBjaOx2uFYtIWNGoz3yrNDlg== - dependencies: - "@types/bn.js" "*" - "@types/underscore" "*" - "@wry/equality@^0.1.2": version "0.1.9" resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.9.tgz#b13e18b7a8053c6858aa6c85b54911fb31e3a909" @@ -5656,6 +5653,13 @@ ethashjs@~0.0.7: ethereumjs-util "^4.0.1" miller-rabin "^4.0.0" +ethereum-bloom-filters@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz#9cdebb3ec20de96ec4a434c6bad6ea5a513037aa" + integrity sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA== + dependencies: + js-sha3 "^0.8.0" + ethereum-common@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" @@ -5750,7 +5754,7 @@ ethereumjs-blockchain@^3.4.0: safe-buffer "^5.1.2" semaphore "^1.1.0" -ethereumjs-common@^1.1.0: +ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.1, ethereumjs-common@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.3.2.tgz#5a20831e52199a31ff4b68ef361e34c05c976ed0" integrity sha512-GkltYRIqBLzaZLmF/K3E+g9lZ4O4FL+TtpisAlD3N+UVlR+mrtoG+TvxavqVa6PwOY4nKIEMe5pl6MrTio3Lww== @@ -5763,6 +5767,14 @@ ethereumjs-tx@1.3.7, ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^ ethereum-common "^0.0.18" ethereumjs-util "^5.0.0" +ethereumjs-tx@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.1.tgz#7d204e2b319156c9bc6cec67e9529424a26e8ccc" + integrity sha512-QtVriNqowCFA19X9BCRPMgdVNJ0/gMBS91TQb1DfrhsbR748g4STwxZptFAwfqehMyrF8rDwB23w87PQwru0wA== + dependencies: + ethereumjs-common "^1.3.1" + ethereumjs-util "^6.0.0" + ethereumjs-util@6.1.0, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8" @@ -8706,7 +8718,7 @@ js-sha3@0.5.7, js-sha3@^0.5.7: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= -js-sha3@0.8.0: +js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== @@ -12222,7 +12234,7 @@ randomatic@^3.0.0: kind-of "^6.0.0" math-random "^1.0.1" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -13177,6 +13189,13 @@ scrypt-js@2.0.4: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== +"scrypt-shim@github:web3-js/scrypt-shim": + version "0.1.0" + resolved "https://codeload.github.com/web3-js/scrypt-shim/tar.gz/be5e616323a8b5e568788bf94d03c1b8410eac54" + dependencies: + scryptsy "^2.1.0" + semver "^6.3.0" + scrypt.js@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/scrypt.js/-/scrypt.js-0.3.0.tgz#6c62d61728ad533c8c376a2e5e3e86d41a95c4c0" @@ -13193,7 +13212,7 @@ scrypt@^6.0.2: dependencies: nan "^2.0.8" -scryptsy@2.1.0: +scryptsy@2.1.0, scryptsy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== @@ -13258,7 +13277,7 @@ semver@6.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^6.0.0, semver@^6.2.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13644,19 +13663,7 @@ socks@~2.3.2: ip "^1.1.5" smart-buffer "4.0.2" -solc@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.0.tgz#2deb2ae992acac3afb909f85c38d00f01dcb335e" - integrity sha512-mdLHDl9WeYrN+FIKcMc9PlPfnA9DG9ur5QpCDKcv6VC4RINAsTF4EMuXMZMKoQTvZhtLyJIVH/BZ+KU830Z8Xg== - dependencies: - fs-extra "^0.30.0" - keccak "^1.0.2" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - yargs "^11.0.0" - -solc@^0.5.0: +solc@0.5.12, solc@^0.5.0: version "0.5.12" resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.12.tgz#e63047dce04c82ec6f469f6e28febfbde713b808" integrity sha512-OX/AGZT04tuUsagoVXSZBiBZYJReA02hdwZOfRkB03/eeYP9Dl3pr+M+au+1MhssgiuWBlFPN7sRXFiqwkAW2g== @@ -15443,6 +15450,16 @@ web3-bzz@1.2.1: swarm-js "0.1.39" underscore "1.9.1" +web3-bzz@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.2.tgz#a3b9f613c49fd3e120e0997088a73557d5adb724" + integrity sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" + web3-core-helpers@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" @@ -15452,6 +15469,15 @@ web3-core-helpers@1.2.1: web3-eth-iban "1.2.1" web3-utils "1.2.1" +web3-core-helpers@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz#484974f4bd4a487217b85b0d7cfe841af0907619" + integrity sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.2" + web3-utils "1.2.2" + web3-core-method@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" @@ -15463,6 +15489,17 @@ web3-core-method@1.2.1: web3-core-subscriptions "1.2.1" web3-utils "1.2.1" +web3-core-method@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.2.tgz#d4fe2bb1945b7152e5f08e4ea568b171132a1e56" + integrity sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-utils "1.2.2" + web3-core-promievent@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" @@ -15471,6 +15508,14 @@ web3-core-promievent@1.2.1: any-promise "1.3.0" eventemitter3 "3.1.2" +web3-core-promievent@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz#3b60e3f2a0c96db8a891c927899d29d39e66ab1c" + integrity sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + web3-core-requestmanager@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" @@ -15482,6 +15527,17 @@ web3-core-requestmanager@1.2.1: web3-providers-ipc "1.2.1" web3-providers-ws "1.2.1" +web3-core-requestmanager@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz#667ba9ac724c9c76fa8965ae8a3c61f66e68d8d6" + integrity sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-providers-http "1.2.2" + web3-providers-ipc "1.2.2" + web3-providers-ws "1.2.2" + web3-core-subscriptions@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" @@ -15491,6 +15547,15 @@ web3-core-subscriptions@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" +web3-core-subscriptions@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz#bf4ba23a653a003bdc3551649958cc0b080b068e" + integrity sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-core@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" @@ -15501,6 +15566,18 @@ web3-core@1.2.1: web3-core-requestmanager "1.2.1" web3-utils "1.2.1" +web3-core@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.2.tgz#334b99c8222ef9cfd0339e27352f0b58ea789a2f" + integrity sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-requestmanager "1.2.2" + web3-utils "1.2.2" + web3-eth-abi@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.52.tgz#88dc2d36e2f99dfe255f8f64b6f613bad82779d8" @@ -15520,6 +15597,15 @@ web3-eth-abi@1.2.1: underscore "1.9.1" web3-utils "1.2.1" +web3-eth-abi@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz#d5616d88a90020f894763423a9769f2da11fe37a" + integrity sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.2" + web3-eth-accounts@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" @@ -15537,6 +15623,24 @@ web3-eth-accounts@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" +web3-eth-accounts@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz#c187e14bff6baa698ac352220290222dbfd332e5" + integrity sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-shim "github:web3-js/scrypt-shim" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + web3-eth-contract@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" @@ -15551,6 +15655,21 @@ web3-eth-contract@1.2.1: web3-eth-abi "1.2.1" web3-utils "1.2.1" +web3-eth-contract@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz#84e92714918a29e1028ee7718f0712536e14e9a1" + integrity sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-promievent "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-utils "1.2.2" + web3-eth-ens@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" @@ -15565,6 +15684,20 @@ web3-eth-ens@1.2.1: web3-eth-contract "1.2.1" web3-utils "1.2.1" +web3-eth-ens@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz#0a4abed1d4cbdacbf5e1ab06e502d806d1192bc6" + integrity sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-promievent "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-contract "1.2.2" + web3-utils "1.2.2" + web3-eth-iban@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" @@ -15573,6 +15706,14 @@ web3-eth-iban@1.2.1: bn.js "4.11.8" web3-utils "1.2.1" +web3-eth-iban@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz#76bec73bad214df7c4192388979a59fc98b96c5a" + integrity sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.2" + web3-eth-personal@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" @@ -15584,6 +15725,18 @@ web3-eth-personal@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" +web3-eth-personal@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz#eee1c86a8132fa16b5e34c6d421ca92e684f0be6" + integrity sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + web3-eth@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" @@ -15603,6 +15756,25 @@ web3-eth@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" +web3-eth@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.2.tgz#65a1564634a23b990efd1655bf94ad513904286c" + integrity sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA== + dependencies: + underscore "1.9.1" + web3-core "1.2.2" + web3-core-helpers "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-eth-abi "1.2.2" + web3-eth-accounts "1.2.2" + web3-eth-contract "1.2.2" + web3-eth-ens "1.2.2" + web3-eth-iban "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-utils "1.2.2" + web3-net@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" @@ -15612,6 +15784,15 @@ web3-net@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" +web3-net@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.2.tgz#5c3226ca72df7c591422440ce6f1203fd42ddad9" + integrity sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-utils "1.2.2" + web3-provider-engine@14.2.0: version "14.2.0" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.0.tgz#2efec157b2c429c5c674c079aea96b0a06de8b3d" @@ -15697,6 +15878,14 @@ web3-providers-http@1.2.1: web3-core-helpers "1.2.1" xhr2-cookies "1.1.0" +web3-providers-http@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.2.tgz#155e55c1d69f4c5cc0b411ede40dea3d06720956" + integrity sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg== + dependencies: + web3-core-helpers "1.2.2" + xhr2-cookies "1.1.0" + web3-providers-ipc@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" @@ -15706,6 +15895,15 @@ web3-providers-ipc@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" +web3-providers-ipc@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz#c6d165a12bc68674b4cdd543ea18aec79cafc2e8" + integrity sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.2" + web3-providers-ws@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" @@ -15715,6 +15913,15 @@ web3-providers-ws@1.2.1: web3-core-helpers "1.2.1" websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" +web3-providers-ws@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz#d2c05c68598cea5ad3fa6ef076c3bcb3ca300d29" + integrity sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.2" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + web3-shh@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" @@ -15725,6 +15932,16 @@ web3-shh@1.2.1: web3-core-subscriptions "1.2.1" web3-net "1.2.1" +web3-shh@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.2.tgz#44ed998f2a6ba0ec5cb9d455184a0f647826a49c" + integrity sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg== + dependencies: + web3-core "1.2.2" + web3-core-method "1.2.2" + web3-core-subscriptions "1.2.2" + web3-net "1.2.2" + web3-utils@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.52.tgz#27f9beeac3e1ea981eba9824d79e2971f156eebc" @@ -15754,6 +15971,20 @@ web3-utils@1.2.1: underscore "1.9.1" utf8 "3.0.0" +web3-utils@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.2.tgz#b53a08c40d2c3f31d3c4a28e7d749405df99c8c0" + integrity sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + web3@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" @@ -15767,6 +15998,20 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" +web3@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.2.tgz#b1b8b69aafdf94cbaeadbb68a8aa1df2ef266aec" + integrity sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.2" + web3-core "1.2.2" + web3-eth "1.2.2" + web3-eth-personal "1.2.2" + web3-net "1.2.2" + web3-shh "1.2.2" + web3-utils "1.2.2" + web3@^0.18.4: version "0.18.4" resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d"