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 /packages/base-contract/src | |
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
Diffstat (limited to 'packages/base-contract/src')
-rw-r--r-- | packages/base-contract/src/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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]); }); } } |