aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-10-09 22:28:44 +0800
committerGitHub <noreply@github.com>2018-10-09 22:28:44 +0800
commitbd06ebde8d1a5caf138ad3b36f9a5c5f255f2312 (patch)
treeb0229d6f0c45d72064aa59528f26546569563bb2 /packages
parent9876f6cc3416033ddea7ade082799d542e620de4 (diff)
parentfbd7115500b310caae5205d59ae1ba26befe5a35 (diff)
downloaddexon-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
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/package.json2
-rw-r--r--packages/base-contract/package.json2
-rw-r--r--packages/base-contract/src/index.ts8
-rw-r--r--packages/contract-wrappers/package.json2
-rw-r--r--packages/contract_templates/contract.handlebars2
-rw-r--r--packages/contracts/package.json2
-rw-r--r--packages/fill-scenarios/package.json2
-rw-r--r--packages/metacoin/package.json2
-rw-r--r--packages/migrations/package.json2
-rw-r--r--packages/order-utils/package.json2
-rw-r--r--packages/order-watcher/package.json2
-rw-r--r--packages/utils/package.json2
-rw-r--r--packages/utils/src/abi_decoder.ts6
-rw-r--r--packages/web3-wrapper/package.json2
14 files changed, 19 insertions, 19 deletions
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": {