diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-10-09 22:28:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-09 22:28:44 +0800 |
commit | bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312 (patch) | |
tree | b0229d6f0c45d72064aa59528f26546569563bb2 | |
parent | 9876f6cc3416033ddea7ade082799d542e620de4 (diff) | |
parent | fbd7115500b310caae5205d59ae1ba26befe5a35 (diff) | |
download | dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar.gz dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar.bz2 dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar.lz dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar.xz dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.tar.zst dexon-sol-tools-bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312.zip |
Merge pull request #1122 from 0xProject/feature/new-ethers
Upgrade ethers.js version
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | packages/0x.js/package.json | 2 | ||||
-rw-r--r-- | packages/base-contract/package.json | 2 | ||||
-rw-r--r-- | packages/base-contract/src/index.ts | 8 | ||||
-rw-r--r-- | packages/contract-wrappers/package.json | 2 | ||||
-rw-r--r-- | packages/contract_templates/contract.handlebars | 2 | ||||
-rw-r--r-- | packages/contracts/package.json | 2 | ||||
-rw-r--r-- | packages/fill-scenarios/package.json | 2 | ||||
-rw-r--r-- | packages/metacoin/package.json | 2 | ||||
-rw-r--r-- | packages/migrations/package.json | 2 | ||||
-rw-r--r-- | packages/order-utils/package.json | 2 | ||||
-rw-r--r-- | packages/order-watcher/package.json | 2 | ||||
-rw-r--r-- | packages/utils/package.json | 2 | ||||
-rw-r--r-- | packages/utils/src/abi_decoder.ts | 6 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 2 | ||||
-rw-r--r-- | yarn.lock | 12 |
16 files changed, 29 insertions, 24 deletions
diff --git a/package.json b/package.json index 6c47d88db..7b30d00c1 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,8 @@ } ], "ci": { - "trackBranches": ["master", "development"] + "trackBranches": ["master", "development"], + "repoBranchBase": "development" } }, "devDependencies": { diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 6a3074d26..1a57edd45 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -84,7 +84,7 @@ "@0xproject/utils": "^2.0.2", "@0xproject/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5", "web3-provider-engine": "14.0.6" }, diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 7aac46ab9..4ee471219 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -45,7 +45,7 @@ "@0xproject/utils": "^2.0.2", "@0xproject/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 981e6fca6..a8e4ad2e2 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -17,7 +17,7 @@ import * as _ from 'lodash'; import { formatABIDataItem } from './utils'; export interface EthersInterfaceByFunctionSignature { - [key: string]: ethers.Interface; + [key: string]: ethers.utils.Interface; } const REVERT_ERROR_SELECTOR = '08c379a0'; @@ -101,7 +101,7 @@ export class BaseContract { // if it overflows the corresponding Solidity type, there is a bug in the // encoder, or the encoder performs unsafe type coercion. public static strictArgumentEncodingCheck(inputAbi: DataItem[], args: any[]): void { - const coder = new ethers.AbiCoder(); + const coder = new ethers.utils.AbiCoder(); const params = abiUtils.parseEthersParams(inputAbi); const rawEncoded = coder.encode(inputAbi, args); const rawDecoded = coder.decode(inputAbi, rawEncoded); @@ -117,7 +117,7 @@ export class BaseContract { } } } - protected _lookupEthersInterface(functionSignature: string): ethers.Interface { + protected _lookupEthersInterface(functionSignature: string): ethers.utils.Interface { const ethersInterface = this._ethersInterfacesByFunctionSignature[functionSignature]; if (_.isUndefined(ethersInterface)) { throw new Error(`Failed to lookup method with function signature '${functionSignature}'`); @@ -154,7 +154,7 @@ export class BaseContract { this._ethersInterfacesByFunctionSignature = {}; _.each(methodAbis, methodAbi => { const functionSignature = abiUtils.getFunctionSignature(methodAbi); - this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.Interface([methodAbi]); + this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.utils.Interface([methodAbi]); }); } } diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index e83caad97..35f27d77c 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -84,7 +84,7 @@ "ethereum-types": "^1.0.11", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "js-sha3": "^0.7.0", "lodash": "^4.17.5", "uuid": "^3.1.0" diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 9ae39f44f..41e5c8630 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -65,7 +65,7 @@ export class {{contractName}}Contract extends BaseContract { [{{> params inputs=ctor.inputs}}], BaseContract._bigNumberToString, ); - const iface = new ethers.Interface(abi); + const iface = new ethers.utils.Interface(abi); const deployInfo = iface.deployFunction; const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); const web3Wrapper = new Web3Wrapper(provider); diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 081e5f8ee..01d04e645 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -84,7 +84,7 @@ "ethereum-types": "^1.0.11", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "js-combinatorics": "^0.5.3", "lodash": "^4.17.5" } diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 0616454d6..dd6ede3e0 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -45,7 +45,7 @@ "@0xproject/utils": "^2.0.2", "@0xproject/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 83082d964..58fc0b848 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -41,7 +41,7 @@ "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", "ethereum-types": "^1.0.11", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5", "run-s": "^0.0.0" }, diff --git a/packages/migrations/package.json b/packages/migrations/package.json index dcae2c562..2d1b7bfc2 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -54,7 +54,7 @@ "@0xproject/web3-wrapper": "^3.0.3", "@ledgerhq/hw-app-eth": "^4.3.0", "ethereum-types": "^1.0.11", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "optionalDependencies": { diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 23ed9ca12..6471de9f5 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -70,7 +70,7 @@ "ethereum-types": "^1.0.11", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 1b075b8ea..9bdaef5b1 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -82,7 +82,7 @@ "bintrees": "^1.0.2", "ethereum-types": "^1.0.11", "ethereumjs-blockstream": "6.0.0", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/utils/package.json b/packages/utils/package.json index f1017f84d..20b0f0c86 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -50,7 +50,7 @@ "detect-node": "2.0.3", "ethereum-types": "^1.0.11", "ethereumjs-util": "^5.1.1", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "isomorphic-fetch": "^2.2.1", "js-sha3": "^0.7.0", "lodash": "^4.17.5" diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index ea8c91d10..ac3e54efb 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -9,7 +9,7 @@ import { RawLog, SolidityTypes, } from 'ethereum-types'; -import * as ethers from 'ethers'; +import { ethers } from 'ethers'; import * as _ from 'lodash'; import { addressUtils } from './address_utils'; @@ -41,7 +41,7 @@ export class AbiDecoder { return log; } const event = this._methodIds[methodId][numIndexedArgs]; - const ethersInterface = new ethers.Interface([event]); + const ethersInterface = new ethers.utils.Interface([event]); const decodedParams: DecodedLogArgs = {}; let topicsIndex = 1; @@ -96,7 +96,7 @@ export class AbiDecoder { if (_.isUndefined(abiArray)) { return; } - const ethersInterface = new ethers.Interface(abiArray); + const ethersInterface = new ethers.utils.Interface(abiArray); _.map(abiArray, (abi: AbiDefinition) => { if (abi.type === AbiType.Event) { const topic = ethersInterface.events[abi.name].topic; diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index ef31a68dc..a3f82c87e 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -60,7 +60,7 @@ "@0xproject/utils": "^2.0.2", "ethereum-types": "^1.0.11", "ethereumjs-util": "^5.1.1", - "ethers": "4.0.0-beta.14", + "ethers": "~4.0.4", "lodash": "^4.17.5" }, "publishConfig": { @@ -5671,9 +5671,9 @@ ethers@3.0.22: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@4.0.0-beta.14: - version "4.0.0-beta.14" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.14.tgz#76aa9257b9c93a7604ff4dc11f2a445d07f6459d" +ethers@~4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.4.tgz#d3f85e8b27f4b59537e06526439b0fb15b44dc65" dependencies: "@types/node" "^10.3.2" aes-js "3.0.0" @@ -5681,7 +5681,7 @@ ethers@4.0.0-beta.14: elliptic "6.3.3" hash.js "1.1.3" js-sha3 "0.5.7" - scrypt-js "2.0.3" + scrypt-js "2.0.4" setimmediate "1.0.4" uuid "2.0.1" xmlhttprequest "1.8.0" @@ -13200,6 +13200,10 @@ scrypt-js@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + scrypt.js@0.2.0, scrypt.js@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/scrypt.js/-/scrypt.js-0.2.0.tgz#af8d1465b71e9990110bedfc593b9479e03a8ada" |