aboutsummaryrefslogtreecommitdiffstats
path: root/packages/base-contract
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-11 20:25:47 +0800
committerFabio Berger <me@fabioberger.com>2018-10-11 20:25:47 +0800
commit295a8c760a6d5b567a12d6a2d83ae73021ea343c (patch)
treefaf6810a6b5b810869e36c20641fd4fe25e03ddb /packages/base-contract
parent9b147f14955c5f6a0b38e03ae30ac13b1be183d1 (diff)
parent1cfcc82ea9869e14c1a1b78e1376c89fdbeb91f4 (diff)
downloaddexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.gz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.bz2
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.lz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.xz
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.tar.zst
dexon-sol-tools-295a8c760a6d5b567a12d6a2d83ae73021ea343c.zip
merge dev-section-redesign
Diffstat (limited to 'packages/base-contract')
-rw-r--r--packages/base-contract/package.json2
-rw-r--r--packages/base-contract/src/index.ts8
2 files changed, 5 insertions, 5 deletions
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]);
});
}
}