diff options
author | Jacob Evans <jacob@dekz.net> | 2018-04-19 09:21:32 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-04-19 09:21:32 +0800 |
commit | 12ae7c009d548c2b7241b3a3896b159f1829a500 (patch) | |
tree | f00bc364052a4c5d8317350bb077991fe8d2f08e /packages/base-contract/src | |
parent | 62fcb51e1a9893b8d18536eefc9497d6c1f36c39 (diff) | |
download | dexon-0x-contracts-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.gz dexon-0x-contracts-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.zst dexon-0x-contracts-12ae7c009d548c2b7241b3a3896b159f1829a500.zip |
Support Tuples from function returns
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 bfa99fac1..e95b18db6 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -10,13 +10,13 @@ import { } from '@0xproject/types'; import { abiUtils, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import * as ethersContracts from 'ethers-contracts'; +import * as ethers from 'ethers'; import * as _ from 'lodash'; import { formatABIDataItem } from './utils'; export interface EthersInterfaceByFunctionSignature { - [key: string]: ethersContracts.Interface; + [key: string]: ethers.Interface; } export class BaseContract { @@ -62,7 +62,7 @@ export class BaseContract { } return txDataWithDefaults; } - protected _lookupEthersInterface(functionSignature: string): ethersContracts.Interface { + protected _lookupEthersInterface(functionSignature: string): ethers.Interface { const ethersInterface = this._ethersInterfacesByFunctionSignature[functionSignature]; if (_.isUndefined(ethersInterface)) { throw new Error(`Failed to lookup method with function signature '${functionSignature}'`); @@ -92,7 +92,7 @@ export class BaseContract { this._ethersInterfacesByFunctionSignature = {}; _.each(methodAbis, methodAbi => { const functionSignature = abiUtils.getFunctionSignature(methodAbi); - this._ethersInterfacesByFunctionSignature[functionSignature] = new ethersContracts.Interface([methodAbi]); + this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.Interface([methodAbi]); }); } } |