diff options
author | Andrew Maurer <git@maurer.me> | 2018-10-13 23:09:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-13 23:09:50 +0800 |
commit | 69e9dbd68323439ac817e71c610dfae3716bee26 (patch) | |
tree | 6b2791f09132524963ae5e0bb58afffcb3720736 /packages/base-contract/src/index.ts | |
parent | dc56ce454967d2bf0d5e8c93389c0fa71a9d1cc5 (diff) | |
parent | a424c2adfabbbd9313b4f5ddeeeaebd0811fd1cd (diff) | |
download | dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar.gz dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar.bz2 dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar.lz dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar.xz dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.tar.zst dexon-sol-tools-69e9dbd68323439ac817e71c610dfae3716bee26.zip |
Merge branch 'development' into development
Diffstat (limited to 'packages/base-contract/src/index.ts')
-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]); }); } } |